mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
369 Commits
Author | SHA1 | Date | |
---|---|---|---|
bcf9f53a40 | |||
b824d0d6b3 | |||
4ec0cb9ee0 | |||
![]() |
cd5c4247a6 | ||
![]() |
d1e1692581 | ||
![]() |
c9fd0782ae | ||
![]() |
c5779935d3 | ||
![]() |
70154d4526 | ||
![]() |
070dfae93d | ||
![]() |
4e5fc734e2 | ||
![]() |
9004749754 | ||
![]() |
e42e7b81ef | ||
![]() |
e788221099 | ||
![]() |
e96b383339 | ||
![]() |
e63044e72f | ||
![]() |
0ac530eb86 | ||
![]() |
c1fd63ab25 | ||
![]() |
fd0d010908 | ||
![]() |
de159d6e3a | ||
![]() |
27293c3d36 | ||
![]() |
ffe55f05ba | ||
![]() |
d3b9a5af37 | ||
![]() |
d7772bec48 | ||
![]() |
c2e32d8989 | ||
![]() |
cdbff1ef64 | ||
![]() |
7d20053401 | ||
![]() |
7029346d8d | ||
![]() |
544f268ab8 | ||
![]() |
7dd10474c4 | ||
![]() |
f851794cf2 | ||
![]() |
0ccc0f0846 | ||
![]() |
40d1b2ddd5 | ||
![]() |
a219be6810 | ||
![]() |
fee3f03e17 | ||
![]() |
62128a14e7 | ||
![]() |
47b604c6a7 | ||
![]() |
9fc9cdc9f3 | ||
![]() |
5daa654d10 | ||
![]() |
8c51c699e9 | ||
![]() |
913fb0648b | ||
![]() |
1eacb09f3c | ||
![]() |
efcfceef39 | ||
![]() |
e977ae9e88 | ||
![]() |
b7c8d2f34c | ||
![]() |
51f1e6f866 | ||
![]() |
28abf15720 | ||
![]() |
6b9a295549 | ||
![]() |
c63a0200b3 | ||
![]() |
5fdb817bfd | ||
![]() |
1b5bdf5db3 | ||
![]() |
8022ed450c | ||
![]() |
255734acc5 | ||
![]() |
34b0c93ecd | ||
![]() |
2221e5234d | ||
![]() |
8dd8cce491 | ||
![]() |
d74965d36d | ||
![]() |
cb9e6c4c69 | ||
![]() |
1d93edd35b | ||
![]() |
4c071b9d97 | ||
![]() |
570eceb653 | ||
![]() |
a34a01745c | ||
![]() |
a4b9fa0f69 | ||
![]() |
2da18fe59f | ||
![]() |
5a969d573a | ||
![]() |
0eff36a38e | ||
![]() |
241bacfd49 | ||
![]() |
b292644531 | ||
![]() |
3264837478 | ||
![]() |
70bf5033b5 | ||
![]() |
9ffe114aeb | ||
![]() |
75f6e08d85 | ||
![]() |
3b0c19fbfc | ||
![]() |
e4d10eb622 | ||
![]() |
9cc4783415 | ||
![]() |
762bd81611 | ||
![]() |
6afdfb55ca | ||
![]() |
cb3508b30d | ||
![]() |
171ffc6862 | ||
![]() |
0f19b7415f | ||
![]() |
38019cdb91 | ||
![]() |
89bcb43271 | ||
![]() |
5101dc00b3 | ||
![]() |
a7774349e5 | ||
![]() |
b309e9d4bd | ||
![]() |
ba3fdbe142 | ||
![]() |
645d53f13b | ||
![]() |
838c6361de | ||
![]() |
6cb1d4ad1f | ||
![]() |
28dfda1370 | ||
![]() |
c73b8cf795 | ||
![]() |
807777f022 | ||
![]() |
866488ac0f | ||
![]() |
10097e3d6e | ||
![]() |
becb22a6b0 | ||
![]() |
37fcecfdd8 | ||
![]() |
c4144eb3d2 | ||
![]() |
d29244efcc | ||
![]() |
8901ba0128 | ||
![]() |
b07342baef | ||
![]() |
4d69f984b8 | ||
![]() |
e1149907ce | ||
![]() |
263376ae92 | ||
![]() |
07abc2e2e0 | ||
![]() |
7eba54f09a | ||
![]() |
1eac924291 | ||
![]() |
3ffe250f78 | ||
![]() |
15d173e628 | ||
![]() |
b24424330c | ||
![]() |
ebffa83f17 | ||
![]() |
6abc71a57d | ||
![]() |
8afb20c53b | ||
![]() |
501541b8be | ||
![]() |
e56f63dc0f | ||
![]() |
7e0c33f9a0 | ||
![]() |
bb1b8363d9 | ||
![]() |
e5e585443d | ||
![]() |
d0888a063f | ||
![]() |
bd5781a039 | ||
![]() |
a643c75e7f | ||
![]() |
d4db40f9cc | ||
![]() |
788489119b | ||
![]() |
665adaa44b | ||
![]() |
9f19ee9586 | ||
![]() |
bb84b0e368 | ||
![]() |
7976fdd019 | ||
![]() |
0d3b45189b | ||
![]() |
7005cb0268 | ||
![]() |
81421d918a | ||
![]() |
e3fe198fc1 | ||
![]() |
76d62771e0 | ||
![]() |
4da538302d | ||
![]() |
b981193f19 | ||
![]() |
c656da5c75 | ||
![]() |
dcedf6abca | ||
![]() |
849a71bdac | ||
![]() |
534cc1d1fe | ||
![]() |
40ec6c53fa | ||
![]() |
b7cb3c0945 | ||
![]() |
69d3c7b754 | ||
![]() |
542f11804e | ||
![]() |
8526054aa8 | ||
![]() |
93700bddc7 | ||
![]() |
494500041b | ||
![]() |
011a5a3b23 | ||
![]() |
03726858f0 | ||
![]() |
c8c42cc4b2 | ||
![]() |
0b22b454e6 | ||
![]() |
f4fe03c582 | ||
![]() |
964e87fd6a | ||
![]() |
ec4c0a0d0d | ||
![]() |
f9cf62472c | ||
![]() |
ace584d294 | ||
![]() |
5cd669202b | ||
![]() |
4a09848720 | ||
![]() |
f998f1be9f | ||
![]() |
3352bdfabb | ||
![]() |
ce43a9648f | ||
![]() |
440a0bf393 | ||
![]() |
64a7555f42 | ||
![]() |
3aa6fe3dc0 | ||
![]() |
3522228d45 | ||
![]() |
9b42d9a5c6 | ||
![]() |
4e8d98f956 | ||
![]() |
f6c3d27bbc | ||
![]() |
21daf83fbd | ||
![]() |
7f1203c207 | ||
![]() |
89b1f90973 | ||
![]() |
8002a5497f | ||
![]() |
770d12d79b | ||
![]() |
7e4ac22d23 | ||
![]() |
4f4b26d3e1 | ||
![]() |
4ea7c421a8 | ||
![]() |
3c8b7e2de4 | ||
![]() |
b13acaf823 | ||
![]() |
709cd6ad6e | ||
![]() |
1316ccc56f | ||
![]() |
881ddd0e11 | ||
![]() |
49611ee6b9 | ||
![]() |
539465bb56 | ||
![]() |
bc54a73d69 | ||
![]() |
5eb12f5d14 | ||
![]() |
557e47650f | ||
![]() |
f50753bfd7 | ||
![]() |
7a164d6d5f | ||
![]() |
60bc936cd9 | ||
![]() |
d097e636ea | ||
![]() |
3ce2bbb624 | ||
![]() |
4926d2554e | ||
![]() |
eae135acba | ||
![]() |
8ce3801b87 | ||
![]() |
0c7c11f817 | ||
![]() |
b3a39c05d7 | ||
![]() |
7370012667 | ||
![]() |
412838fd4b | ||
![]() |
273a614389 | ||
![]() |
3944c80ae2 | ||
![]() |
726ab3f91b | ||
![]() |
ab307dd78f | ||
![]() |
e3079912ae | ||
![]() |
52da3ed0e4 | ||
![]() |
cda85169ea | ||
![]() |
978d1df598 | ||
![]() |
f90d22cc20 | ||
![]() |
bae69d92ae | ||
![]() |
b910239825 | ||
![]() |
6421a5969a | ||
![]() |
5c9faba7f4 | ||
![]() |
c1af738cc5 | ||
![]() |
23a80a9260 | ||
![]() |
d9d92f7eee | ||
![]() |
c8be6c203e | ||
![]() |
612c599d9b | ||
![]() |
1292c7d1ae | ||
![]() |
69f07967b5 | ||
![]() |
aedd427c07 | ||
![]() |
9b6c3dc511 | ||
![]() |
b4fa7f4317 | ||
![]() |
f053d305d5 | ||
![]() |
1d95b7ddf7 | ||
![]() |
01a6964d68 | ||
![]() |
d661f96a9b | ||
![]() |
c79fae8ab3 | ||
![]() |
121f130893 | ||
![]() |
da9a0a414a | ||
![]() |
e0732e041b | ||
![]() |
6fc5b3189a | ||
![]() |
2a0c9cb749 | ||
![]() |
7ad131b448 | ||
![]() |
3e7186bd60 | ||
![]() |
132f8cce53 | ||
![]() |
5c07f42afb | ||
![]() |
1f7a2594c8 | ||
![]() |
ec64d19a36 | ||
![]() |
5cb67470d5 | ||
![]() |
c03f01a96a | ||
![]() |
26b67a43ae | ||
![]() |
a93ca3a205 | ||
![]() |
dcc647ba3c | ||
![]() |
fe44f59239 | ||
![]() |
80dba0babf | ||
![]() |
34acf9a91e | ||
![]() |
cb859dbb7b | ||
![]() |
20c04b1e62 | ||
![]() |
69eaf8ed0c | ||
![]() |
62c828d722 | ||
![]() |
251e8e8ff4 | ||
![]() |
acc41ec72e | ||
![]() |
f9ebcf2ee4 | ||
![]() |
f3df231dc2 | ||
![]() |
75a1bb7cc5 | ||
![]() |
7d6a64315a | ||
![]() |
2758071d31 | ||
![]() |
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 |
102
.detekt/baseline.xml
Normal file
102
.detekt/baseline.xml
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?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>ComplexCondition:CommandParser.kt$CommandParser$Character.isLetter(ch) || command.isEmpty() && "~<>@=#*&!".indexOf(ch) >= 0 || command.isNotEmpty() && ch == command[command.length - 1] && "<>".indexOf(ch) >= 0</ID>
|
||||||
|
<ID>ComplexMethod:CommandParser.kt$CommandParser$ @kotlin.jvm.Throws(ExException::class) fun parse(cmd: String): ExCommand</ID>
|
||||||
|
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||||
|
<ID>ComplexMethod:NerdTree.kt$NerdTree$private fun registerCommands()</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:SearchHighlightsHelper.kt$ private fun updateSearchHighlights( pattern: String?, shouldIgnoreSmartCase: Boolean, showHighlights: Boolean, initialOffset: Int, searchRange: LineRange?, forwards: Boolean, forceUpdate: Boolean ): Int</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:CommandParser.kt$CommandParser$ @kotlin.jvm.Throws(ExException::class) fun parse(cmd: String): ExCommand</ID>
|
||||||
|
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||||
|
<ID>LongMethod:NerdTree.kt$NerdTree$private fun registerCommands()</ID>
|
||||||
|
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||||
|
<ID>LongMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any> ): List<Int></ID>
|
||||||
|
<ID>LongMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||||
|
<ID>LoopWithTooManyJumpStatements:NerdTree.kt$NerdTree$while (true) { row++ val nextPath = tree.getPathForRow(row) ?: break val pathCount = nextPath.pathCount if (pathCount == currentPathCount) expectedRow = row if (pathCount < currentPathCount) break }</ID>
|
||||||
|
<ID>LoopWithTooManyJumpStatements:SearchHighlightsHelper.kt$for (project in projectManager.openProjects) { val current = FileEditorManager.getInstance(project).selectedTextEditor ?: continue // [VERSION UPDATE] 202+ Use editors val editors = EditorFactory.getInstance().getEditors(current.document, project) ?: continue for (editor in editors) { // Try to keep existing highlights if possible. Update if hlsearch has changed or if the pattern has changed. // Force update for the situations where the text is the same, but the ignore case values have changed. // E.g. Use `*` to search for a word (which ignores smartcase), then use `/<Up>` to search for the same pattern, // which will match smartcase. Or changing the smartcase/ignorecase settings if (shouldRemoveSearchHighlights(editor, pattern, showHighlights) || forceUpdate) { removeSearchHighlights(editor) } if (pattern == null) continue if (shouldAddAllSearchHighlights(editor, pattern, showHighlights)) { // hlsearch (+ incsearch/noincsearch) val startLine = searchRange?.startLine ?: 0 val endLine = searchRange?.endLine ?: -1 val results = SearchHelper.findAll(editor, pattern, startLine, endLine, shouldIgnoreCase(pattern, shouldIgnoreSmartCase)) if (results.isNotEmpty()) { currentMatchOffset = findClosestMatch(editor, results, initialOffset, forwards) highlightSearchResults(editor, pattern, results, currentMatchOffset) } editor.vimLastSearch = pattern } else if (shouldAddCurrentMatchSearchHighlight(pattern, showHighlights, initialOffset)) { // nohlsearch + incsearch val searchOptions = EnumSet.of(SearchOptions.WHOLE_FILE) if (wrapscan.isSet) searchOptions.add(SearchOptions.WRAP) if (shouldIgnoreSmartCase) searchOptions.add(SearchOptions.IGNORE_SMARTCASE) if (!forwards) searchOptions.add(SearchOptions.BACKWARDS) val result = SearchHelper.findPattern(editor, pattern, initialOffset, 1, searchOptions) if (result != null) { currentMatchOffset = result.startOffset val results = listOf(result) highlightSearchResults(editor, pattern, results, currentMatchOffset) } } else if (shouldMaintainCurrentMatchOffset(pattern, initialOffset)) { // incsearch. If nothing has changed (e.g. we've edited offset values in `/foo/e+2`) make sure we return the // current match offset so the caret remains at the current incsarch match val offset = editor.vimIncsearchCurrentMatchOffset if (offset != null) { currentMatchOffset = offset } } } }</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:CommandParser.kt$CommandParser$10</ID>
|
||||||
|
<ID>MagicNumber:CommandParser.kt$CommandParser$3</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: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$50</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:EditorDataContext.kt$EditorDataContext$class</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: ${this.pluginDescriptor.pluginId}")</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: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>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:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||||
|
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</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:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||||
|
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
||||||
|
<ID>ThrowsCount:CommandHandler.kt$CommandHandler$private fun checkArgs(cmd: ExCommand)</ID>
|
||||||
|
<ID>TooGenericExceptionThrown:CommandParser.kt$CommandParser$throw RuntimeException("Cannot create an ex command: $handlerHolder")</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:SearchHighlightsHelper.kt$com.maddyhome.idea.vim.helper.SearchHighlightsHelper.kt</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
|
14
.github/dependabot.yml
vendored
Normal file
14
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "gradle"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
- package-ecosystem: "maven"
|
||||||
|
directory: "/.teamcity/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
9
.gitignore
vendored
9
.gitignore
vendored
@@ -5,9 +5,16 @@
|
|||||||
!/.idea/scopes
|
!/.idea/scopes
|
||||||
!/.idea/copyright
|
!/.idea/copyright
|
||||||
!/.idea/icon.png
|
!/.idea/icon.png
|
||||||
|
!/.idea/inspectionProfiles
|
||||||
|
!/.idea/fileTemplates
|
||||||
|
!/.idea/runConfigurations
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
/out/
|
/out/
|
||||||
/tmp/
|
/tmp/
|
||||||
|
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
|
||||||
|
.teamcity/.idea
|
||||||
|
.teamcity/target
|
||||||
|
.teamcity/*.iml
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "doc"]
|
||||||
|
path = doc
|
||||||
|
url = https://github.com/JetBrains/ideavim.wiki.git
|
1
.idea/fileTemplates/code/I18nized Concatenation.java
generated
Normal file
1
.idea/fileTemplates/code/I18nized Concatenation.java
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
com.maddyhome.idea.vim.helper.MessageHelper.message("${PROPERTY_KEY}", ${PARAMETERS})
|
1
.idea/fileTemplates/code/I18nized Expression.java
generated
Normal file
1
.idea/fileTemplates/code/I18nized Expression.java
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
com.maddyhome.idea.vim.helper.MessageHelper.message("${PROPERTY_KEY}")
|
36
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
36
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="HardCodedStringLiteral" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
|
<scope name="Production" level="WARNING" enabled="false">
|
||||||
|
<option name="ignoreForAssertStatements" value="true" />
|
||||||
|
<option name="ignoreForExceptionConstructors" value="true" />
|
||||||
|
<option name="ignoreForSpecifiedExceptionConstructors" value="" />
|
||||||
|
<option name="ignoreForJUnitAsserts" value="true" />
|
||||||
|
<option name="ignoreForClassReferences" value="true" />
|
||||||
|
<option name="ignoreForPropertyKeyReferences" value="true" />
|
||||||
|
<option name="ignoreForNonAlpha" value="true" />
|
||||||
|
<option name="ignoreAssignedToConstants" value="false" />
|
||||||
|
<option name="ignoreToString" value="true" />
|
||||||
|
<option name="nonNlsCommentPattern" value="NON-NLS" />
|
||||||
|
</scope>
|
||||||
|
<option name="ignoreForAssertStatements" value="true" />
|
||||||
|
<option name="ignoreForExceptionConstructors" value="true" />
|
||||||
|
<option name="ignoreForSpecifiedExceptionConstructors" value="" />
|
||||||
|
<option name="ignoreForJUnitAsserts" value="true" />
|
||||||
|
<option name="ignoreForClassReferences" value="true" />
|
||||||
|
<option name="ignoreForPropertyKeyReferences" value="true" />
|
||||||
|
<option name="ignoreForNonAlpha" value="true" />
|
||||||
|
<option name="ignoreAssignedToConstants" value="false" />
|
||||||
|
<option name="ignoreToString" value="false" />
|
||||||
|
<option name="nonNlsCommentPattern" value="NON-NLS" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_requireAnnotationsFirst" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MoveVariableDeclarationIntoWhen" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PluginXmlI18n" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
48
.idea/inspectionProfiles/Qodana.xml
generated
Normal file
48
.idea/inspectionProfiles/Qodana.xml
generated
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<description>Inspections profile for Qodana</description>
|
||||||
|
<option name="myName" value="Qodana" />
|
||||||
|
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<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="HardCodedStringLiteral" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
|
<scope name="Production" level="WARNING" enabled="false">
|
||||||
|
<option name="ignoreForAssertStatements" value="true" />
|
||||||
|
<option name="ignoreForExceptionConstructors" value="true" />
|
||||||
|
<option name="ignoreForSpecifiedExceptionConstructors" value="" />
|
||||||
|
<option name="ignoreForJUnitAsserts" value="true" />
|
||||||
|
<option name="ignoreForClassReferences" value="true" />
|
||||||
|
<option name="ignoreForPropertyKeyReferences" value="true" />
|
||||||
|
<option name="ignoreForNonAlpha" value="true" />
|
||||||
|
<option name="ignoreAssignedToConstants" value="false" />
|
||||||
|
<option name="ignoreToString" value="true" />
|
||||||
|
<option name="nonNlsCommentPattern" value="NON-NLS" />
|
||||||
|
</scope>
|
||||||
|
<option name="ignoreForAssertStatements" value="true" />
|
||||||
|
<option name="ignoreForExceptionConstructors" value="true" />
|
||||||
|
<option name="ignoreForSpecifiedExceptionConstructors" value="" />
|
||||||
|
<option name="ignoreForJUnitAsserts" value="true" />
|
||||||
|
<option name="ignoreForClassReferences" value="true" />
|
||||||
|
<option name="ignoreForPropertyKeyReferences" value="true" />
|
||||||
|
<option name="ignoreForNonAlpha" value="true" />
|
||||||
|
<option name="ignoreAssignedToConstants" value="false" />
|
||||||
|
<option name="ignoreToString" value="false" />
|
||||||
|
<option name="nonNlsCommentPattern" value="NON-NLS" />
|
||||||
|
</inspection_tool>
|
||||||
|
<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="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
25
.idea/runConfigurations/IdeaVim_full_verification.xml
generated
Normal file
25
.idea/runConfigurations/IdeaVim_full_verification.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="IdeaVim full verification" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="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>
|
24
.idea/runConfigurations/IdeaVim_tests.xml
generated
Normal file
24
.idea/runConfigurations/IdeaVim_tests.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="IdeaVim tests" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="test" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.idea/runConfigurations/Start_IJ_with_IdeaVim.xml
generated
Normal file
24
.idea/runConfigurations/Start_IJ_with_IdeaVim.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Start IJ with IdeaVim" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="runIde" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
10
.teamcity/_Self/Constants.kt
vendored
Normal file
10
.teamcity/_Self/Constants.kt
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package _Self
|
||||||
|
|
||||||
|
object Constants {
|
||||||
|
const val DEFAULT = "default"
|
||||||
|
const val EAP = "eap"
|
||||||
|
const val DEV = "Dev"
|
||||||
|
|
||||||
|
const val VERSION = "0.64"
|
||||||
|
const val DEV_VERSION = "0.65"
|
||||||
|
}
|
89
.teamcity/_Self/Project.kt
vendored
Normal file
89
.teamcity/_Self/Project.kt
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
package _Self
|
||||||
|
|
||||||
|
import _Self.buildTypes.GitHubPullRequests
|
||||||
|
import _Self.buildTypes.Nvim
|
||||||
|
import _Self.buildTypes.PluginVerifier
|
||||||
|
import _Self.buildTypes.PropertyBased
|
||||||
|
import _Self.buildTypes.Qodana
|
||||||
|
import _Self.buildTypes.TestsForIntelliJ20202
|
||||||
|
import _Self.buildTypes.TestsForIntelliJ20203
|
||||||
|
import _Self.buildTypes.TestsForIntelliJEAP
|
||||||
|
import _Self.subprojects.OldTests
|
||||||
|
import _Self.subprojects.Releases
|
||||||
|
import _Self.vcsRoots.Branch_181
|
||||||
|
import _Self.vcsRoots.Branch_183
|
||||||
|
import _Self.vcsRoots.Branch_191_193
|
||||||
|
import _Self.vcsRoots.Branch_201
|
||||||
|
import _Self.vcsRoots.GitHubPullRequest
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
|
||||||
|
object Project : Project({
|
||||||
|
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||||
|
|
||||||
|
subProjects(Releases, OldTests)
|
||||||
|
|
||||||
|
// VCS roots
|
||||||
|
vcsRoot(Branch_183)
|
||||||
|
vcsRoot(Branch_181)
|
||||||
|
vcsRoot(Branch_191_193)
|
||||||
|
vcsRoot(Branch_201)
|
||||||
|
vcsRoot(GitHubPullRequest)
|
||||||
|
|
||||||
|
// Builds
|
||||||
|
buildType(GitHubPullRequests)
|
||||||
|
|
||||||
|
buildType(TestsForIntelliJ20202)
|
||||||
|
buildType(TestsForIntelliJ20203)
|
||||||
|
buildType(TestsForIntelliJEAP)
|
||||||
|
|
||||||
|
buildType(PropertyBased)
|
||||||
|
|
||||||
|
buildType(Nvim)
|
||||||
|
buildType(PluginVerifier)
|
||||||
|
|
||||||
|
buildType(Qodana)
|
||||||
|
|
||||||
|
// Unknown staff generated by TeamCity
|
||||||
|
features {
|
||||||
|
feature {
|
||||||
|
type = "CloudImage"
|
||||||
|
id = "PROJECT_EXT_768"
|
||||||
|
param("agent_pool_id", "41")
|
||||||
|
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||||
|
param("ebs-optimized", "false")
|
||||||
|
param("image-instances-limit", "")
|
||||||
|
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||||
|
param("instance-type", "c5d.large")
|
||||||
|
param("key-pair-name", "teamcity-prod-pub")
|
||||||
|
param("profileId", "amazon-48")
|
||||||
|
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||||
|
param("source-id", "BuildAgentsIdeaVim")
|
||||||
|
param("spot-instance-price", "0.1")
|
||||||
|
param("subnet-id", "subnet-58839511")
|
||||||
|
param("use-spot-instances", "true")
|
||||||
|
param("user-tags", "project=idea-vim")
|
||||||
|
param("instance-type", "c5d.xlarge")
|
||||||
|
param("spot-instance-price", "0.12")
|
||||||
|
}
|
||||||
|
feature {
|
||||||
|
type = "CloudProfile"
|
||||||
|
id = "amazon-48"
|
||||||
|
param("agentPushPreset", "")
|
||||||
|
param("cloud-code", "amazon")
|
||||||
|
param("description", "")
|
||||||
|
param("enabled", "true")
|
||||||
|
param("max-running-instances", "10")
|
||||||
|
param("name", "Cloud Agents")
|
||||||
|
param("next-hour", "")
|
||||||
|
param("not-checked", "")
|
||||||
|
param("profileId", "amazon-48")
|
||||||
|
param("profileServerUrl", "")
|
||||||
|
param("region", "eu-west-1")
|
||||||
|
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||||
|
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||||
|
param("system.cloud.profile_id", "amazon-48")
|
||||||
|
param("terminate-idle-time", "15")
|
||||||
|
param("total-work-time", "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
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 TestsForIntelliJ20203 : ActiveTests("Tests for IntelliJ 2020.3", "2020.3")
|
||||||
|
object TestsForIntelliJ20202 : ActiveTests("Tests for IntelliJ 2020.2", "2020.2")
|
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.3")
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
})
|
41
.teamcity/_Self/buildTypes/PropertyBased.kt
vendored
Normal file
41
.teamcity/_Self/buildTypes/PropertyBased.kt
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
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 PropertyBased : BuildType({
|
||||||
|
name = "Property based tests"
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(DslContext.settingsRoot)
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.ON_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
gradle {
|
||||||
|
tasks = "clean testPropertyBased"
|
||||||
|
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/Qodana.kt
vendored
Normal file
42
.teamcity/_Self/buildTypes/Qodana.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.qodana
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||||
|
|
||||||
|
object Qodana : BuildType({
|
||||||
|
name = "Qodana checks"
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(DslContext.settingsRoot)
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.ON_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
qodana {
|
||||||
|
name = "Qodana"
|
||||||
|
reportAsTestsEnable = ""
|
||||||
|
failBuildOnErrors = ""
|
||||||
|
codeInspectionXmlConfig = "Custom"
|
||||||
|
codeInspectionCustomXmlConfigPath = ".idea/inspectionProfiles/Qodana.xml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
vcs {
|
||||||
|
branchFilter = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
requirements {
|
||||||
|
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||||
|
}
|
||||||
|
})
|
46
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
46
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.Constants.DEFAULT
|
||||||
|
import _Self.Constants.DEV
|
||||||
|
import _Self.Constants.EAP
|
||||||
|
import _Self.Constants.VERSION
|
||||||
|
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 = VERSION
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
|
label = "Password"
|
||||||
|
)
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishChannels", "$DEFAULT,$EAP,$DEV")
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(DslContext.settingsRoot)
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.ON_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
gradle {
|
||||||
|
tasks = "clean publishPlugin"
|
||||||
|
buildFile = ""
|
||||||
|
enableStacktrace = true
|
||||||
|
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
55
.teamcity/_Self/buildTypes/ReleaseDev.kt
vendored
Normal file
55
.teamcity/_Self/buildTypes/ReleaseDev.kt
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.Constants.DEV
|
||||||
|
import _Self.Constants.DEV_VERSION
|
||||||
|
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.schedule
|
||||||
|
|
||||||
|
object ReleaseDev : BuildType({
|
||||||
|
name = "Publish Dev Build"
|
||||||
|
description = "Build and publish Dev of IdeaVim plugin"
|
||||||
|
|
||||||
|
artifactRules = "build/distributions/*"
|
||||||
|
buildNumberPattern = "$DEV_VERSION-dev.%build.counter%"
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
|
label = "Password"
|
||||||
|
)
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishChannels", DEV)
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(DslContext.settingsRoot)
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.ON_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
gradle {
|
||||||
|
tasks = "clean publishPlugin"
|
||||||
|
buildFile = ""
|
||||||
|
enableStacktrace = true
|
||||||
|
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
schedule {
|
||||||
|
enabled = true
|
||||||
|
schedulingPolicy = daily {
|
||||||
|
hour = 22
|
||||||
|
}
|
||||||
|
branchFilter = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
61
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
61
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.Constants.EAP
|
||||||
|
import _Self.Constants.VERSION
|
||||||
|
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 = "$VERSION.%build.counter%"
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
|
label = "Password"
|
||||||
|
)
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
features {
|
||||||
|
vcsLabeling {
|
||||||
|
vcsRootId = "${DslContext.settingsRoot.id}"
|
||||||
|
labelingPattern = "%system.build.number%-EAP"
|
||||||
|
successfulOnly = true
|
||||||
|
branchFilter = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
45
.teamcity/_Self/buildTypes/Release_201.kt
vendored
Normal file
45
.teamcity/_Self/buildTypes/Release_201.kt
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package _Self.buildTypes
|
||||||
|
|
||||||
|
import _Self.Constants.DEFAULT
|
||||||
|
import _Self.Constants.DEV
|
||||||
|
import _Self.Constants.EAP
|
||||||
|
import _Self.Constants.VERSION
|
||||||
|
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
|
||||||
|
|
||||||
|
object Release_201 : BuildType({
|
||||||
|
name = "Publish Release 2020.1"
|
||||||
|
description = "Build and publish IdeaVim plugin"
|
||||||
|
|
||||||
|
artifactRules = "build/distributions/*"
|
||||||
|
buildNumberPattern = "$VERSION-2020.1"
|
||||||
|
|
||||||
|
params {
|
||||||
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
||||||
|
password(
|
||||||
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
|
label = "Password"
|
||||||
|
)
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
|
param("env.ORG_GRADLE_PROJECT_publishChannels", "$DEFAULT,$EAP,$DEV")
|
||||||
|
}
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(_Self.vcsRoots.Branch_201)
|
||||||
|
|
||||||
|
checkoutMode = CheckoutMode.ON_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
gradle {
|
||||||
|
tasks = "clean publishPlugin"
|
||||||
|
buildFile = ""
|
||||||
|
enableStacktrace = true
|
||||||
|
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
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")
|
46
.teamcity/_Self/buildTypes/TestsForIntelliJ_201.kt
vendored
Normal file
46
.teamcity/_Self/buildTypes/TestsForIntelliJ_201.kt
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
@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_201_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_201)
|
||||||
|
|
||||||
|
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 TestsForIntelliJ20201 : TestsForIntelliJ_201_branch("2020.1")
|
23
.teamcity/_Self/subprojects/OldTests.kt
vendored
Normal file
23
.teamcity/_Self/subprojects/OldTests.kt
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package _Self.subprojects
|
||||||
|
|
||||||
|
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 jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
|
||||||
|
object OldTests : Project({
|
||||||
|
name = "Old IdeaVim tests"
|
||||||
|
description = "Tests for older versions of IJ"
|
||||||
|
|
||||||
|
buildType(TestsForIntelliJ20201)
|
||||||
|
buildType(TestsForIntelliJ20191)
|
||||||
|
buildType(TestsForIntelliJ20181)
|
||||||
|
buildType(TestsForIntelliJ20192)
|
||||||
|
buildType(TestsForIntelliJ20182)
|
||||||
|
buildType(TestsForIntelliJ20193)
|
||||||
|
buildType(TestsForIntelliJ20183)
|
||||||
|
})
|
17
.teamcity/_Self/subprojects/Releases.kt
vendored
Normal file
17
.teamcity/_Self/subprojects/Releases.kt
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package _Self.subprojects
|
||||||
|
|
||||||
|
import _Self.buildTypes.Release
|
||||||
|
import _Self.buildTypes.ReleaseDev
|
||||||
|
import _Self.buildTypes.ReleaseEap
|
||||||
|
import _Self.buildTypes.Release_201
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
|
||||||
|
object Releases : Project({
|
||||||
|
name = "IdeaVim releases"
|
||||||
|
description = "Stable and EAP releases for IdeaVim"
|
||||||
|
|
||||||
|
buildType(Release)
|
||||||
|
buildType(Release_201)
|
||||||
|
buildType(ReleaseEap)
|
||||||
|
buildType(ReleaseDev)
|
||||||
|
})
|
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/Branch_201.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_201.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_201 : GitVcsRoot({
|
||||||
|
name = "https://github.com/JetBrains/ideavim (branch 201)"
|
||||||
|
url = "https://github.com/JetBrains/ideavim.git"
|
||||||
|
branch = "201"
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
})
|
68
.teamcity/patches/projects/_Self.kts
vendored
Normal file
68
.teamcity/patches/projects/_Self.kts
vendored
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
package patches.projects
|
||||||
|
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ProjectFeature
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
|
||||||
|
|
||||||
|
/*
|
||||||
|
This patch script was generated by TeamCity on settings change in UI.
|
||||||
|
To apply the patch, change the root project
|
||||||
|
accordingly, and delete the patch script.
|
||||||
|
*/
|
||||||
|
changeProject(DslContext.projectId) {
|
||||||
|
features {
|
||||||
|
val feature1 = find<ProjectFeature> {
|
||||||
|
feature {
|
||||||
|
type = "CloudImage"
|
||||||
|
id = "PROJECT_EXT_768"
|
||||||
|
param("agent_pool_id", "41")
|
||||||
|
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||||
|
param("ebs-optimized", "false")
|
||||||
|
param("image-instances-limit", "")
|
||||||
|
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||||
|
param("instance-type", "c5d.xlarge")
|
||||||
|
param("key-pair-name", "teamcity-prod-pub")
|
||||||
|
param("profileId", "amazon-48")
|
||||||
|
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||||
|
param("source-id", "BuildAgentsIdeaVim")
|
||||||
|
param("spot-instance-price", "0.12")
|
||||||
|
param("subnet-id", "subnet-58839511")
|
||||||
|
param("use-spot-instances", "true")
|
||||||
|
param("user-tags", "project=idea-vim")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
feature1.apply {
|
||||||
|
param("spot-instance-price", "")
|
||||||
|
param("key-pair-name", "")
|
||||||
|
}
|
||||||
|
val feature2 = find<ProjectFeature> {
|
||||||
|
feature {
|
||||||
|
type = "CloudProfile"
|
||||||
|
id = "amazon-48"
|
||||||
|
param("agentPushPreset", "")
|
||||||
|
param("cloud-code", "amazon")
|
||||||
|
param("description", "")
|
||||||
|
param("enabled", "true")
|
||||||
|
param("max-running-instances", "10")
|
||||||
|
param("name", "Cloud Agents")
|
||||||
|
param("next-hour", "")
|
||||||
|
param("not-checked", "")
|
||||||
|
param("profileId", "amazon-48")
|
||||||
|
param("profileServerUrl", "")
|
||||||
|
param("region", "eu-west-1")
|
||||||
|
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||||
|
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||||
|
param("system.cloud.profile_id", "amazon-48")
|
||||||
|
param("terminate-idle-time", "15")
|
||||||
|
param("total-work-time", "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
feature2.apply {
|
||||||
|
param("user-script", "")
|
||||||
|
param("spot-fleet-config", "")
|
||||||
|
param("terminate-after-build", "true")
|
||||||
|
param("name", "Cloud Agents - Single Build")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
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.2"
|
||||||
|
project(_Self.Project)
|
33
AUTHORS.md
33
AUTHORS.md
@@ -10,10 +10,6 @@ The original author:
|
|||||||
|
|
||||||
The current maintainers:
|
The current maintainers:
|
||||||
|
|
||||||
* [![icon][mail]](mailto:andrey.vlasovskikh@gmail.com)
|
|
||||||
[![icon][github]](https://github.com/vlasovskikh)
|
|
||||||
|
|
||||||
Andrey Vlasovskikh
|
|
||||||
* [![icon][mail]](mailto:alexpl292@gmail.com)
|
* [![icon][mail]](mailto:alexpl292@gmail.com)
|
||||||
[![icon][github]](https://github.com/AlexPl292)
|
[![icon][github]](https://github.com/AlexPl292)
|
||||||
|
|
||||||
@@ -25,8 +21,13 @@ Previous maintainers:
|
|||||||
[![icon][github]](https://github.com/olegs)
|
[![icon][github]](https://github.com/olegs)
|
||||||
|
|
||||||
Oleg Shpynov
|
Oleg Shpynov
|
||||||
|
* [![icon][mail]](mailto:andrey.vlasovskikh@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/vlasovskikh)
|
||||||
|
|
||||||
|
Andrey Vlasovskikh
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
* [![icon][mail]](mailto:yole@jetbrains.com)
|
* [![icon][mail]](mailto:yole@jetbrains.com)
|
||||||
[![icon][github]](https://github.com/yole)
|
[![icon][github]](https://github.com/yole)
|
||||||
|
|
||||||
@@ -323,6 +324,30 @@ Contributors:
|
|||||||
[![icon][github]](https://github.com/i-e-b)
|
[![icon][github]](https://github.com/i-e-b)
|
||||||
|
|
||||||
Iain Ballard
|
Iain Ballard
|
||||||
|
* [![icon][mail]](mailto:brandoncc@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/brandoncc)
|
||||||
|
|
||||||
|
Brandon Conway
|
||||||
|
* [![icon][mail]](mailto:ga@anadoxin.org)
|
||||||
|
[![icon][github]](https://github.com/antekone)
|
||||||
|
|
||||||
|
Grzegorz Antoniak
|
||||||
|
* [![icon][mail]](mailto:shaunpatterson@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/shaunpatterson)
|
||||||
|
|
||||||
|
Shaun Patterson
|
||||||
|
* [![icon][mail]](mailto:vladimir.petrenko@jetbrains.com)
|
||||||
|
[![icon][github]](https://github.com/vladimir-petrenko)
|
||||||
|
|
||||||
|
Vladimir Petrenko
|
||||||
|
* [![icon][mail]](mailto:sergey.vorobyov@jetbrains.com)
|
||||||
|
[![icon][github]](https://github.com/DeveloperHacker)
|
||||||
|
|
||||||
|
Sergei Vorobyov
|
||||||
|
* [![icon][mail]](mailto:daya0576@gmail.com)
|
||||||
|
[![icon][github]](https://github.com/daya0576)
|
||||||
|
|
||||||
|
大牙(Henry Zhu)
|
||||||
|
|
||||||
If you are a contributor and your name is not listed here, feel free to
|
If you are a contributor and your name is not listed here, feel free to
|
||||||
contact the maintainers.
|
contact the maintainers.
|
||||||
|
261
CHANGES.md
261
CHANGES.md
@@ -22,13 +22,112 @@ It is important to distinguish EAP from traditional pre-release software.
|
|||||||
Please note that the quality of EAP versions may at times be way below even
|
Please note that the quality of EAP versions may at times be way below even
|
||||||
usual beta standards.
|
usual beta standards.
|
||||||
|
|
||||||
0.60, 2020-10-09
|
## To Be Released
|
||||||
-----------
|
|
||||||
|
|
||||||
**Features:**
|
### Features:
|
||||||
|
* Support `NERDTree` extension [VIM-1042](https://youtrack.jetbrains.com/issue/VIM-1042) | [NERDTree](https://github.com/preservim/nerdtree)
|
||||||
|
* Support `maxmapdepth` option to define the maximum depth of mappings
|
||||||
|
|
||||||
|
### Fixes:
|
||||||
|
* [VIM-2202](https://youtrack.jetbrains.com/issue/VIM-2202) Fix macro recording for ex command and search
|
||||||
|
* [VIM-1799](https://youtrack.jetbrains.com/issue/VIM-1799)
|
||||||
|
[VIM-1794](https://youtrack.jetbrains.com/issue/VIM-1794)
|
||||||
|
Special characters are not interpreted on yanking
|
||||||
|
* [VIM-2218](https://youtrack.jetbrains.com/issue/VIM-2218) Fix some shortcuts for 2021.+
|
||||||
|
* [VIM-2217](https://youtrack.jetbrains.com/issue/VIM-2217) Fix adding new line at the end of the file for the AppCode
|
||||||
|
* [VIM-2220](https://youtrack.jetbrains.com/issue/VIM-2220) Do not try to get a commandState for null editor
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [269](https://github.com/JetBrains/ideavim/pull/269) by [大牙(Henry Zhu)](https://github.com/daya0576): fix invalid link of submodule docs
|
||||||
|
|
||||||
|
## 0.64, 2020-12-23
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [260](https://github.com/JetBrains/ideavim/pull/260) by [Matt Ellis](https://github.com/citizenmatt): Refactor SearchGroup
|
||||||
|
|
||||||
|
### Fixes:
|
||||||
|
* [VIM-2194](https://youtrack.jetbrains.com/issue/VIM-2194) Fix caret shape during editing a new file
|
||||||
|
|
||||||
|
## 0.63, 2020-12-16
|
||||||
|
|
||||||
|
### Changes:
|
||||||
|
* Update the minimal required IJ version: 2020.2+
|
||||||
|
|
||||||
|
### Fixes:
|
||||||
|
* [CWM-927](https://youtrack.jetbrains.com/issue/CWM-927) Fix typing for CodeWithMe and IdeaVim
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [259](https://github.com/JetBrains/ideavim/pull/259) by [Vladimir Petrenko](https://github.com/vladimir-petrenko): CWM-927 disable vim for client's hidden editor on host
|
||||||
|
|
||||||
|
## 0.62, 2020-12-15
|
||||||
|
|
||||||
|
### Features:
|
||||||
|
* Support `unmap` and `mapclear` commands [VIM-1491](https://youtrack.jetbrains.com/issue/VIM-1491)
|
||||||
|
* Support mappings in ex panel (`cmap`) [VIM-1227](https://youtrack.jetbrains.com/issue/VIM-1227)
|
||||||
|
|
||||||
|
### Changes:
|
||||||
|
* `octal` is now disabled by default for `nrformats`. [VIM-2181](https://youtrack.jetbrains.com/issue/VIM-2181)
|
||||||
|
|
||||||
|
### Fixes:
|
||||||
|
* [VIM-2113](https://youtrack.jetbrains.com/issue/VIM-2113) Fix `cit` for empty tags
|
||||||
|
* [VIM-2114](https://youtrack.jetbrains.com/issue/VIM-2114) Unnamed register isn't changed after deleting empty tag
|
||||||
|
* [VIM-1475](https://youtrack.jetbrains.com/issue/VIM-1475) Enable block caret to be used in insert mode.
|
||||||
|
* [VIM-2170](https://youtrack.jetbrains.com/issue/VIM-2170) Fix an alternative range format for `s` command
|
||||||
|
* [VIM-1913](https://youtrack.jetbrains.com/issue/VIM-1913)
|
||||||
|
[VIM-2154](https://youtrack.jetbrains.com/issue/VIM-2154) Several fixes for AppCode templates
|
||||||
|
* [VIM-1756](https://youtrack.jetbrains.com/issue/VIM-1756) Fix startsel from insert mode
|
||||||
|
|
||||||
|
### Merged PRs:
|
||||||
|
* [249](https://github.com/JetBrains/ideavim/pull/249) by [Jan Palus](https://github.com/jpalus): VIM-2113 Increase tag range only in visual mode
|
||||||
|
* [250](https://github.com/JetBrains/ideavim/pull/250) by [Jan Palus](https://github.com/jpalus): VIM-2114 Do not override registers when deleting empty range
|
||||||
|
* [256](https://github.com/JetBrains/ideavim/pull/256) by [Brandon Conway](https://github.com/brandoncc): Fix typo
|
||||||
|
* [254](https://github.com/JetBrains/ideavim/pull/254) by [Grzegorz Antoniak](https://github.com/antekone): VIM-1475: Add an option to use block caret in insert mode
|
||||||
|
* [225](https://github.com/JetBrains/ideavim/pull/225) by [sumoooru2](https://github.com/sumoooru2): Implement cmap
|
||||||
|
* [258](https://github.com/JetBrains/ideavim/pull/258) by [Matt Ellis](https://github.com/citizenmatt): Show the correct handler class in :map
|
||||||
|
* [257](https://github.com/JetBrains/ideavim/pull/257) by [Matt Ellis](https://github.com/citizenmatt): Extract SearchHighlightsHelper from SearchGroup
|
||||||
|
* [251](https://github.com/JetBrains/ideavim/pull/251) by [Shaun Patterson](https://github.com/shaunpatterson): VIM-1756: startSel works in insert mode
|
||||||
|
|
||||||
|
## 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))
|
* Support of `virtualedit=onemore` ([VIM-844](https://youtrack.jetbrains.com/issue/VIM-844))
|
||||||
|
|
||||||
**Fixes:**
|
### Fixes:
|
||||||
* [VIM-2097](https://youtrack.jetbrains.com/issue/VIM-2097) Do not apply mappings for register selecting
|
* [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-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-2099](https://youtrack.jetbrains.com/issue/VIM-2099) Fix operations with backward inclusive motions
|
||||||
@@ -38,22 +137,21 @@ usual beta standards.
|
|||||||
* [VIM-1770](https://youtrack.jetbrains.com/issue/VIM-1770) Fix goto end with large inline hints
|
* [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
|
* [VIM-2110](https://youtrack.jetbrains.com/issue/VIM-2110) Fix scrolling for non-monospaced fonts
|
||||||
|
|
||||||
**Changes:**
|
### Changes:
|
||||||
* `:w` works as `:wa` by default. This can be disabled with `ideawrite` option.
|
* `: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.
|
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).
|
See [VIM-1968](https://youtrack.jetbrains.com/issue/VIM-1968).
|
||||||
|
|
||||||
**Merged PRs:**
|
### 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
|
* [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
|
* [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
|
* [252](https://github.com/JetBrains/ideavim/pull/252) by [Matt Ellis](https://github.com/citizenmatt): Fixes for scrolling
|
||||||
|
|
||||||
0.59, 2020-08-25
|
## 0.59, 2020-08-25
|
||||||
------------
|
|
||||||
|
|
||||||
**Features:**
|
### Features:
|
||||||
* `vim-highlightedyank` plugin emulation ([VIM-1970](https://youtrack.jetbrains.com/issue/VIM-1970) | [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)).
|
* `vim-highlightedyank` plugin emulation ([VIM-1970](https://youtrack.jetbrains.com/issue/VIM-1970) | [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)).
|
||||||
|
|
||||||
* <details>
|
* <details>
|
||||||
@@ -63,22 +161,21 @@ usual beta standards.
|
|||||||
|
|
||||||
* [VIM-2068](https://youtrack.jetbrains.com/issue/VIM-2068) `:tabclose` command
|
* [VIM-2068](https://youtrack.jetbrains.com/issue/VIM-2068) `:tabclose` command
|
||||||
|
|
||||||
**Fixes:**
|
### Fixes:
|
||||||
* [VIM-1421](https://youtrack.jetbrains.com/issue/VIM-1421) Escape key finishes `t` and `f` motions
|
* [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-2075](https://youtrack.jetbrains.com/issue/VIM-2075) Fix zR command
|
||||||
* [VIM-2059](https://youtrack.jetbrains.com/issue/VIM-2059) Fixed macro editing
|
* [VIM-2059](https://youtrack.jetbrains.com/issue/VIM-2059) Fixed macro editing
|
||||||
|
|
||||||
**Merged PRs:**
|
### Merged PRs:
|
||||||
* [237](https://github.com/JetBrains/ideavim/pull/237) by [Adrià Farrés](https://github.com/adriafarres): Reset operator-pending commands on escape
|
* [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
|
* [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
|
* [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
|
* [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
|
* [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
|
## 0.58, 2020-07-07
|
||||||
-------------
|
|
||||||
|
|
||||||
**Features:**
|
### Features:
|
||||||
* `exchange` plugin emulation ([VIM-921](https://youtrack.jetbrains.com/issue/VIM-921) | [vim-exchange](https://github.com/tommcdo/vim-exchange)).
|
* `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.
|
* `~/.ideavimrc` file can be reloaded using the new floating action.
|
||||||
|
|
||||||
@@ -89,10 +186,10 @@ usual beta standards.
|
|||||||
|
|
||||||
* Add `:buffer` command.
|
* Add `:buffer` command.
|
||||||
|
|
||||||
**Changes:**
|
### Changes:
|
||||||
* Support IntelliJ's smooth scrolling. Use "Enable smooth scrolling" checkbox in _Preferences | Editor | General_ to disable.
|
* 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-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-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-2038](https://youtrack.jetbrains.com/issue/VIM-2038) Last line is now accessible in normal mode
|
||||||
@@ -102,7 +199,7 @@ usual beta standards.
|
|||||||
* Fix mappings to `"\<SPACE>"` including `let mapleader="\<SPACE>"`
|
* 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.
|
* [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.
|
* [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.
|
* [227](https://github.com/JetBrains/ideavim/pull/227) by [angelbot](https://github.com/angelbot): Add support for buffer command.
|
||||||
@@ -110,33 +207,31 @@ usual beta standards.
|
|||||||
* [231](https://github.com/JetBrains/ideavim/pull/231) by [citizenmatt](https://github.com/citizenmatt): Support smooth scrolling.
|
* [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
|
* [239](https://github.com/JetBrains/ideavim/pull/239) by [citizenmatt](https://github.com/citizenmatt): Use new API for relative line numbers
|
||||||
|
|
||||||
0.57, 2020-04-28
|
## 0.57, 2020-04-28
|
||||||
-------------
|
|
||||||
|
|
||||||
**Fixes:**
|
### Fixes:
|
||||||
* [VIM-1992](https://youtrack.jetbrains.com/issue/VIM-1992) Fix mappings to `<S-Letter>`
|
* [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
|
* [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
|
* [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)).
|
* `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)).
|
* `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-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.
|
* [VIM-434](https://youtrack.jetbrains.com/issue/VIM-434) Add `'showcmd'` support, on by default.
|
||||||
* Support `ls/buffers/files` commands.
|
* Support `ls/buffers/files` commands.
|
||||||
|
|
||||||
**Changes:**
|
### Changes:
|
||||||
* Replace `ideastatusbar` option with `ideastatusicon`. Now you can make the icon gray.
|
* Replace `ideastatusbar` option with `ideastatusicon`. Now you can make the icon gray.
|
||||||
|
|
||||||
**Deprecations:**
|
### Deprecations:
|
||||||
* `ideastatusbar` option is deprecated now. See `ideastatusicon`.
|
* `ideastatusbar` option is deprecated now. See `ideastatusicon`.
|
||||||
|
|
||||||
**Fixes:**
|
### Fixes:
|
||||||
* [VIM-1284](https://youtrack.jetbrains.com/issue/VIM-1284) Fix mapping of digits.
|
* [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.
|
* 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>`.
|
* Allow mapping of `<C-K>` and `<C-V>`/`<C-Q>`.
|
||||||
@@ -149,15 +244,14 @@ usual beta standards.
|
|||||||
* [VIM-1911](https://youtrack.jetbrains.com/issue/VIM-1911) Lookup keys respect `IDE` handler.
|
* [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.
|
* [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))
|
* 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))
|
* 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))
|
* 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-1823](https://youtrack.jetbrains.com/issue/VIM-1823) Fix multiple carets with ignorecase
|
||||||
* [VIM-1053](https://youtrack.jetbrains.com/issue/VIM-1053)
|
* [VIM-1053](https://youtrack.jetbrains.com/issue/VIM-1053)
|
||||||
[VIM-1038](https://youtrack.jetbrains.com/issue/VIM-1038)
|
[VIM-1038](https://youtrack.jetbrains.com/issue/VIM-1038)
|
||||||
@@ -180,21 +274,20 @@ usual beta standards.
|
|||||||
* [VIM-1884](https://youtrack.jetbrains.com/issue/VIM-1884) Show quickDoc during popup with `CTRL-J`
|
* [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
|
* [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))
|
* EasyMotion plugin emulation ([VIM-820](https://youtrack.jetbrains.com/issue/VIM-820) | [Instructions](https://github.com/JetBrains/ideavim#emulated-vim-plugins))
|
||||||
* Support surrounding with a function name ([link](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L138))
|
* Support surrounding with a function name ([link](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L138))
|
||||||
* Add `:delmarks` command ([VIM-1720](https://youtrack.jetbrains.com/issue/VIM-1720))
|
* 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))
|
* 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>)
|
* Remove the default IdeaVim toggle shortcut (<kbd>CTRL</kbd><kbd>ALT</kbd><kbd>V</kbd>)
|
||||||
* Rename `refactoring` value of `selectmode` option to `ideaselection`
|
* Rename `refactoring` value of `selectmode` option to `ideaselection`
|
||||||
* Remove `template` value of `selectmode` option and replace it with `idearefactormode` option.
|
* Remove `template` value of `selectmode` option and replace it with `idearefactormode` option.
|
||||||
|
|
||||||
**Fixes:**
|
### Fixes:
|
||||||
* [VIM-1766](https://youtrack.jetbrains.com/issue/VIM-1766) Fix disappearing caret in ex entry on Linux
|
* [VIM-1766](https://youtrack.jetbrains.com/issue/VIM-1766) Fix disappearing caret in ex entry on Linux
|
||||||
* [VIM-1032](https://youtrack.jetbrains.com/issue/VIM-1032) Annotations work well with relative line numbers enabled
|
* [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
|
* [VIM-1762](https://youtrack.jetbrains.com/issue/VIM-1762) Relative line numbers respect line number theme
|
||||||
@@ -221,8 +314,7 @@ usual beta standards.
|
|||||||
* [VIM-1604](https://youtrack.jetbrains.com/issue/VIM-1604) Add IdeaVim logo
|
* [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-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-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
|
* [VIM-1713](https://youtrack.jetbrains.com/issue/VIM-1713) Surround in visual mode put caret in correct position
|
||||||
@@ -233,8 +325,7 @@ usual beta standards.
|
|||||||
* [VIM-1736](https://youtrack.jetbrains.com/issue/VIM-1736) Fix `` for ex panel
|
* [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
|
* [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).
|
* Introduce [Select Mode](https://github.com/JetBrains/ideavim/wiki/Select-mode).
|
||||||
|
|
||||||
@@ -327,8 +418,7 @@ usual beta standards.
|
|||||||
* [VIM-1698](https://youtrack.jetbrains.com/issue/VIM-1698) Paste doesn't clear clipboard
|
* [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
|
* [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-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
|
* [VIM-1187](https://youtrack.jetbrains.com/issue/VIM-1187) Improved performance of `set relativelinenumber` on large files
|
||||||
@@ -336,8 +426,7 @@ usual beta standards.
|
|||||||
* [VIM-798](https://youtrack.jetbrains.com/issue/VIM-798) Allow arrow keys for window navigation commands
|
* [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
|
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
|
for vim-multiple-cursors commands `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>` (put `set
|
||||||
@@ -363,8 +452,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
|
* [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.
|
Enabled zero-latency typing for Vim emulation. Added support for `iskeyword` option. Various bug fixes.
|
||||||
|
|
||||||
@@ -372,8 +460,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-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
|
* [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.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -387,8 +474,7 @@ Features:
|
|||||||
* Support for zero-latency rendering
|
* Support for zero-latency rendering
|
||||||
|
|
||||||
|
|
||||||
0.47, 2016-10-19
|
## 0.47, 2016-10-19
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -398,8 +484,7 @@ Bug fixes:
|
|||||||
* VIM-1190 Fixed exception "Write access is allowed from write-safe contexts only"
|
* 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
|
Added `incsearch` option for incremental search. Added support for `it` and
|
||||||
`at` tag block selection. Added `vim-surround` commands `ys`, `cs`, `ds`,
|
`at` tag block selection. Added `vim-surround` commands `ys`, `cs`, `ds`,
|
||||||
@@ -427,8 +512,7 @@ Bug fixes:
|
|||||||
* VIM-1126 Fixed warning about modifying shortcuts of global actions for 2016.2
|
* 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.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -437,16 +521,14 @@ A bugfix release.
|
|||||||
plugin disabled
|
plugin disabled
|
||||||
|
|
||||||
|
|
||||||
0.43, 2015-11-02
|
## 0.43, 2015-11-02
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
* VIM-1039 Fixed running the plugin with Java 6
|
* 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
|
This release is compatible with IntelliJ 15+ and other IDEs based on the
|
||||||
IntelliJ platform branch 143+.
|
IntelliJ platform branch 143+.
|
||||||
@@ -454,8 +536,7 @@ IntelliJ platform branch 143+.
|
|||||||
* VIM-970 Fixed move commands in read-only files
|
* VIM-970 Fixed move commands in read-only files
|
||||||
|
|
||||||
|
|
||||||
0.41, 2015-06-10
|
## 0.41, 2015-06-10
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -463,8 +544,7 @@ A bugfix release.
|
|||||||
IntelliJ
|
IntelliJ
|
||||||
|
|
||||||
|
|
||||||
0.40, 2015-06-09
|
## 0.40, 2015-06-09
|
||||||
----------------
|
|
||||||
|
|
||||||
Added support for `mapleader`. Support comments in `%` brace matching. Various
|
Added support for `mapleader`. Support comments in `%` brace matching. Various
|
||||||
bug fixes.
|
bug fixes.
|
||||||
@@ -491,8 +571,7 @@ Bug fixes:
|
|||||||
* VIM-930 Fixed editor focus issues after closing Ex entry box on Oracle Java 6
|
* 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.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -504,8 +583,7 @@ Bug fixes:
|
|||||||
* EA-63022 Don't update line numbers in the caret movement event listener
|
* 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`
|
Added support for `number` and `relativenumber` options, `clipboard=unnamed`
|
||||||
option. Added `:action` and `:actionlist` commands for executing arbitrary
|
option. Added `:action` and `:actionlist` commands for executing arbitrary
|
||||||
@@ -537,8 +615,7 @@ Bug fixes:
|
|||||||
* VIM-723 Fix pasting to an empty line
|
* VIM-723 Fix pasting to an empty line
|
||||||
|
|
||||||
|
|
||||||
0.37, 2014-10-15
|
## 0.37, 2014-10-15
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -549,8 +626,7 @@ Bug fixes:
|
|||||||
* VIM-407 Fixed `>>` to work if a line contains only one character
|
* 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
|
Added support for common window splitting and navigation commands. Various bug
|
||||||
fixes.
|
fixes.
|
||||||
@@ -569,8 +645,7 @@ Bug fixes:
|
|||||||
* VIM-569 Fixed `<C-W>` when the caret is at the end of a line
|
* 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
|
The `~/.vimrc` initialization file is no longer read by default, use
|
||||||
`~/.ideavimrc` instead.
|
`~/.ideavimrc` instead.
|
||||||
@@ -591,8 +666,7 @@ Bug fixes:
|
|||||||
selection
|
selection
|
||||||
|
|
||||||
|
|
||||||
0.34, 2014-04-29
|
## 0.34, 2014-04-29
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -606,8 +680,7 @@ Bug fixes:
|
|||||||
* VIM-667 Ignore potentially nested lines of .vimrc based on leading whitespace
|
* 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
|
Added support for `:map` key mapping commands. New keyboard shortcuts handler
|
||||||
that doesn't require a separate keymap for Vim emulation. Added support for
|
that doesn't require a separate keymap for Vim emulation. Added support for
|
||||||
@@ -626,14 +699,12 @@ Bug fixes:
|
|||||||
* VIM-281 Don't disable global reformat code action for Vim emulation
|
* 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+.
|
Fixed API compatibility with IntelliJ platform builds 132.1052+.
|
||||||
|
|
||||||
|
|
||||||
0.31, 2013-11-12
|
## 0.31, 2013-11-12
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -642,8 +713,7 @@ Bug fixes:
|
|||||||
* VIM-582 Fixed line comment and reformat commands with no visual selection
|
* 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
|
Added support for a separate `.ideavimrc` config file. Fixed long-standing
|
||||||
issues with merged undo/redo commands and `<Esc>` during code completion.
|
issues with merged undo/redo commands and `<Esc>` during code completion.
|
||||||
@@ -663,8 +733,7 @@ Bug fixes:
|
|||||||
* Fixed several reported exceptions
|
* Fixed several reported exceptions
|
||||||
|
|
||||||
|
|
||||||
0.29, 2013-05-15
|
## 0.29, 2013-05-15
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -675,8 +744,7 @@ Bug fixes:
|
|||||||
* VIM-121 Don't move cursor while scrolling
|
* VIM-121 Don't move cursor while scrolling
|
||||||
|
|
||||||
|
|
||||||
0.28, 2013-04-06
|
## 0.28, 2013-04-06
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -686,8 +754,7 @@ Bug fixes:
|
|||||||
* VIM-479 Don't try to activate insert mode for diff view
|
* 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.
|
New Vim keymap generator creates better keymaps, especially for Mac OS X.
|
||||||
Restart after reconfiguring the keymap is no longer required.
|
Restart after reconfiguring the keymap is no longer required.
|
||||||
@@ -708,8 +775,7 @@ Bug fixes:
|
|||||||
* Fixed command window font size to match editor font size
|
* 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>`,
|
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
|
from the clipboard using `<S-Insert>` or `<M-V>`. Added support for the last
|
||||||
@@ -728,8 +794,7 @@ Bug fixes:
|
|||||||
* VIM-302 Fixed tab switching order for `gt` and `gT`
|
* VIM-302 Fixed tab switching order for `gt` and `gT`
|
||||||
|
|
||||||
|
|
||||||
0.25, 2012-12-19
|
## 0.25, 2012-12-19
|
||||||
----------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -738,8 +803,7 @@ A bugfix release.
|
|||||||
character
|
character
|
||||||
|
|
||||||
|
|
||||||
0.24, 2012-12-03
|
## 0.24, 2012-12-03
|
||||||
----------------
|
|
||||||
|
|
||||||
Added Vim string object selection motions (see help topics `v_i"`, `v_a"`).
|
Added Vim string object selection motions (see help topics `v_i"`, `v_a"`).
|
||||||
Various bug fixes.
|
Various bug fixes.
|
||||||
@@ -778,8 +842,7 @@ Bug fixes:
|
|||||||
* VIM-157 Fixed regression in moving the cursor after `~`
|
* VIM-157 Fixed regression in moving the cursor after `~`
|
||||||
|
|
||||||
|
|
||||||
0.23.115, 2012-11-14
|
## 0.23.115, 2012-11-14
|
||||||
--------------------
|
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -788,8 +851,7 @@ A bugfix release.
|
|||||||
* VIM-112 Delete a single previous word with <C-W> in insert mode, not all inserted words
|
* 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.
|
A bugfix release.
|
||||||
|
|
||||||
@@ -808,8 +870,7 @@ A bugfix release.
|
|||||||
found
|
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.
|
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.
|
Unfortunately you need to update Vim.xml manually this time.
|
||||||
|
@@ -26,7 +26,12 @@ OK, ready to do some coding?
|
|||||||
* Fork the repository and clone it to the local machine.
|
* Fork the repository and clone it to the local machine.
|
||||||
* Open the project with IntelliJ IDEA.
|
* Open the project with IntelliJ IDEA.
|
||||||
|
|
||||||
Yoo hoo! You’re all set to begin contributing. Here are some useful gradle commands:
|
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 runIde` — start the dev version of IntelliJ IDEA with IdeaVim installed.
|
||||||
* `./gradlew test` — run tests.
|
* `./gradlew test` — run tests.
|
||||||
@@ -136,5 +141,5 @@ This is just terrible. [You know what to do](https://github.com/JetBrains/ideavi
|
|||||||
* [Changelog](CHANGES.md)
|
* [Changelog](CHANGES.md)
|
||||||
* [Contributors listing](AUTHORS.md)
|
* [Contributors listing](AUTHORS.md)
|
||||||
|
|
||||||
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJ20201&guest=1
|
[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_TestsForIntelliJ20201)/statusIcon.svg?guest=1
|
[teamcity-build-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJEAP)/statusIcon.svg?guest=1
|
||||||
|
104
README.md
104
README.md
@@ -11,7 +11,7 @@ IdeaVim
|
|||||||
[![Gitter][gitter-svg]][gitter]
|
[![Gitter][gitter-svg]][gitter]
|
||||||
[![Twitter][twitter-svg]][twitter]
|
[![Twitter][twitter-svg]][twitter]
|
||||||
|
|
||||||
IdeaVim is a Vim emulation plugin for IDEs based on the IntelliJ Platform.
|
IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs.
|
||||||
|
|
||||||
##### Contact maintainers:
|
##### Contact maintainers:
|
||||||
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
* [Bug tracker](https://youtrack.jetbrains.com/issues/VIM)
|
||||||
@@ -81,12 +81,12 @@ Here are some examples of supported vim features and commands:
|
|||||||
* Motion / deletion / change / window / etc. commands
|
* Motion / deletion / change / window / etc. commands
|
||||||
* Key mappings
|
* Key mappings
|
||||||
* Marks / Macros / Digraphs / Registers
|
* Marks / Macros / Digraphs / Registers
|
||||||
* Some [set commands](doc/set-commands.md)
|
* Some [set commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands)
|
||||||
* Full Vim regexps for search and search/replace
|
* Full Vim regexps for search and search/replace
|
||||||
* Vim web help
|
* Vim web help
|
||||||
* `~/.ideavimrc` configuration file
|
* `~/.ideavimrc` configuration file
|
||||||
|
|
||||||
[Emulated Vim plugins](doc/emulated-plugins.md):
|
[Emulated Vim plugins](https://github.com/JetBrains/ideavim/wiki/Emulated-plugins):
|
||||||
|
|
||||||
* vim-easymotion
|
* vim-easymotion
|
||||||
* vim-surround
|
* vim-surround
|
||||||
@@ -144,28 +144,45 @@ set idearefactormode=keep
|
|||||||
map <leader>f <Plug>(easymotion-s)
|
map <leader>f <Plug>(easymotion-s)
|
||||||
map <leader>e <Plug>(easymotion-f)
|
map <leader>e <Plug>(easymotion-f)
|
||||||
|
|
||||||
map <leader>d :action Debug<CR>
|
map <leader>d <Action>(Debug)
|
||||||
map <leader>r :action RenameElement<CR>
|
map <leader>r <Action>(RenameElement)
|
||||||
map <leader>c :action Stop<CR>
|
map <leader>c <Action>(Stop)
|
||||||
map <leader>z :action ToggleDistractionFreeMode<CR>
|
map <leader>z <Action>(ToggleDistractionFreeMode)
|
||||||
|
|
||||||
map <leader>s :action SelectInProjectView<CR>
|
map <leader>s <Action>(SelectInProjectView)
|
||||||
map <leader>a :action Annotate<CR>
|
map <leader>a <Action>(Annotate)
|
||||||
map <leader>h :action Vcs.ShowTabbedFileHistory<CR>
|
map <leader>h <Action>(Vcs.ShowTabbedFileHistory)
|
||||||
map <S-Space> :action GotoNextError<CR>
|
map <S-Space> <Action>(GotoNextError)
|
||||||
|
|
||||||
map <leader>b :action ToggleLineBreakpoint<CR>
|
map <leader>b <Action>(ToggleLineBreakpoint)
|
||||||
map <leader>o :action FileStructurePopup<CR>
|
map <leader>o <Action>(FileStructurePopup)
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Suggested options</strong> (click to see)</summary>
|
||||||
|
|
||||||
|
Here is also a list of the suggested options from [defaults.vim](https://github.com/vim/vim/blob/master/runtime/defaults.vim)
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Show a few lines of context around the cursor. Note that this makes the
|
||||||
|
" text scroll if you mouse-click near the start or end of the window.
|
||||||
|
set scrolloff=5
|
||||||
|
|
||||||
|
" Do incremental searching
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Don't use Ex mode, use Q for formatting.
|
||||||
|
map Q gq
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
You can read your `~/.vimrc` file from `~/.ideavimrc` with this command:
|
You can read your `~/.vimrc` file from `~/.ideavimrc` with this command:
|
||||||
|
|
||||||
source ~/.vimrc
|
source ~/.vimrc
|
||||||
|
|
||||||
Please note that IdeaVim currently parses `~/.ideavimrc` & `~/.vimrc` files via simple pattern-matching.
|
> :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
|
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
||||||
of VimL files.
|
of VimL files.
|
||||||
|
|
||||||
@@ -181,52 +198,45 @@ Put your settings to `$XDG_CONFIG_HOME/ideavim/ideavimrc` file.
|
|||||||
Emulated Vim Plugins
|
Emulated Vim Plugins
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
See [doc/emulated-plugins.md](doc/emulated-plugins.md)
|
See [doc/emulated-plugins.md](https://github.com/JetBrains/ideavim/wiki/Emulated-plugins)
|
||||||
|
|
||||||
Changes to the IDE
|
Executing IDE Actions
|
||||||
------------------
|
---------------------
|
||||||
|
|
||||||
### Executing IDE Actions
|
IdeaVim adds various commands for listing and executing arbitrary IDE actions as
|
||||||
|
|
||||||
IdeaVim adds two commands for listing and executing arbitrary IDE actions as
|
|
||||||
Ex commands or via `:map` command mappings:
|
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]`
|
* `:actionlist [pattern]`
|
||||||
* Find IDE actions by name or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
* Find IDE actions by id or keymap pattern (E.g. `:actionlist extract`, `:actionlist <C-D`)
|
||||||
* `:action {name}`
|
|
||||||
* Execute an action named `NAME`
|
* 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`).
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>"Track action Ids" Details</strong> (click to see)</summary>
|
||||||
|
<img src="resources/readme/track_action_id.gif" alt="track action ids"/>
|
||||||
|
</details>
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Map \r to the Reformat Code action
|
" Map \r to the Reformat Code action
|
||||||
:map \r :action ReformatCode<CR>
|
:map \r <Action>(ReformatCode)
|
||||||
|
|
||||||
" Map <leader>d to start debug
|
" Map <leader>d to start debug
|
||||||
:map <leader>d :action Debug<CR>
|
:map <leader>d <Action>(Debug)
|
||||||
|
|
||||||
" Map \b to toggle the breakpoint on the current line
|
" Map \b to toggle the breakpoint on the current line
|
||||||
:map \b :action ToggleLineBreakpoint<CR>
|
:map \b <Action>(ToggleLineBreakpoint)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Undo/Redo
|
|
||||||
|
|
||||||
The IdeaVim plugin uses the undo/redo functionality of the IntelliJ Platform,
|
|
||||||
so the behavior of the `u` and `<C-R>` commands may differ from the original
|
|
||||||
Vim. Vim compatibility of undo/redo may be improved in future releases.
|
|
||||||
|
|
||||||
See also [unresolved undo issues](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+Help+topic%3A+u).
|
|
||||||
|
|
||||||
### Escape
|
|
||||||
|
|
||||||
Using `<Esc>` in dialog windows remains problematic. For most dialog windows,
|
|
||||||
the Vim emulator is put into insert mode with `<Esc>` not working. You
|
|
||||||
should use `<C-c>` or `<C-[>` instead. In some dialog windows, the normal mode is
|
|
||||||
switched by default. The usage of the Vim emulator in dialog windows is an area for
|
|
||||||
improvement.
|
|
||||||
|
|
||||||
See also [unresolved escape issues](https://youtrack.jetbrains.com/issues/VIM?q=%23Unresolved+Help+topic%3A+i_Esc).
|
|
||||||
|
|
||||||
:gem: Contributing
|
:gem: Contributing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
@@ -247,15 +257,15 @@ IdeaVim tips and tricks
|
|||||||
- `set ideajoin` to enable join via the IDE. See the [examples](https://jb.gg/f9zji9).
|
- `set ideajoin` to enable join via the IDE. See the [examples](https://jb.gg/f9zji9).
|
||||||
- Make sure `ideaput` is enabled for `clipboard` to enable native IJ insertion in Vim.
|
- Make sure `ideaput` is enabled for `clipboard` to enable native IJ insertion in Vim.
|
||||||
- Sync IJ bookmarks and Vim marks: `set ideamarks`
|
- Sync IJ bookmarks and Vim marks: `set ideamarks`
|
||||||
- Check out more [ex commands](doc/set-commands.md).
|
- Check out more [ex commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||||
|
|
||||||
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
||||||
> :warning: Please note that IdeaVim currently parses `~/.ideavimrc` & `~/.vimrc` files via simple pattern-matching.
|
> :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
|
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
||||||
of VimL files.
|
of VimL files.
|
||||||
|
|
||||||
- Control the status bar icon via the [`ideastatusicon` option](doc/set-commands.md).
|
- Control the status bar icon via the [`ideastatusicon` option](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||||
- Not familiar with the default behaviour during a refactoring? See the [`idearefactormode` option](doc/set-commands.md).
|
- Not familiar with the default behaviour during a refactoring? See the [`idearefactormode` option](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||||
|
|
||||||
Some facts about Vim
|
Some facts about Vim
|
||||||
-------
|
-------
|
||||||
|
120
build.gradle
120
build.gradle
@@ -1,15 +1,21 @@
|
|||||||
|
import dev.feedforward.markdownto.DownParser
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||||
|
classpath "com.github.AlexPl292:mark-down-to-slack:1.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.intellij' version '0.4.18'
|
id 'org.jetbrains.intellij' version '0.6.5'
|
||||||
|
id 'io.gitlab.arturbosch.detekt' version '1.15.0'
|
||||||
|
id "org.jetbrains.changelog" version "1.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
@@ -39,6 +45,8 @@ intellij {
|
|||||||
intellijRepo = "https://www.jetbrains.com/intellij-repository"
|
intellijRepo = "https://www.jetbrains.com/intellij-repository"
|
||||||
plugins = ['java']
|
plugins = ['java']
|
||||||
|
|
||||||
|
downloadRobotServerPlugin.version = "0.10.0"
|
||||||
|
|
||||||
publishPlugin {
|
publishPlugin {
|
||||||
channels publishChannels.split(',')
|
channels publishChannels.split(',')
|
||||||
username publishUsername
|
username publishUsername
|
||||||
@@ -46,16 +54,32 @@ intellij {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runIdeForUiTests {
|
||||||
|
systemProperty "robot-server.port", "8082"
|
||||||
|
}
|
||||||
|
|
||||||
|
runPluginVerifier {
|
||||||
|
ideVersions = ["IC-2020.2.3", "IC-2020.3.2"]
|
||||||
|
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
||||||
|
teamCityOutputFormat = true
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
|
maven { url = "https://jetbrains.bintray.com/intellij-third-party-dependencies" }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||||
compileOnly "org.jetbrains:annotations:19.0.0"
|
compileOnly "org.jetbrains:annotations:20.1.0"
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/com.ensarsarajcic.neovim.java/neovim-api
|
// https://mvnrepository.com/artifact/com.ensarsarajcic.neovim.java/neovim-api
|
||||||
compile group: 'com.ensarsarajcic.neovim.java', name: 'neovim-api', version: '0.1.16'
|
testImplementation("com.ensarsarajcic.neovim.java:neovim-api:0.2.0")
|
||||||
|
testImplementation 'com.ensarsarajcic.neovim.java:core-rpc:0.2.0'
|
||||||
|
|
||||||
|
testImplementation("com.intellij.remoterobot:remote-robot:0.10.3")
|
||||||
|
testImplementation("com.intellij.remoterobot:remote-fixtures:1.1.18")
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
@@ -69,20 +93,68 @@ compileTestKotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task testWithNeovim(type : Test) {
|
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"
|
group = "verification"
|
||||||
systemProperty "ideavim.neovim.test", 'true'
|
systemProperty "ideavim.nvim.test", 'true'
|
||||||
|
exclude '/ui/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
exclude '**/propertybased/**'
|
||||||
|
exclude '/ui/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
task testPropertyBased(type: Test) {
|
||||||
|
group = "verification"
|
||||||
|
include '**/propertybased/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
task testUi(type: Test) {
|
||||||
|
group = "verification"
|
||||||
|
include '/ui/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
task getUnreleasedChangelog() {
|
||||||
|
group = "changelog"
|
||||||
|
doLast {
|
||||||
|
def log = changelog.getUnreleased().toHTML()
|
||||||
|
println log
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("slackEapNotification") {
|
tasks.register("slackEapNotification") {
|
||||||
doLast {
|
doLast {
|
||||||
if (!slackUrl) return
|
if (!slackUrl) return
|
||||||
def post = new URL(slackUrl).openConnection()
|
def post = new URL(slackUrl).openConnection()
|
||||||
def changeLog = extractChangelog()
|
def changeLog = changelog.getUnreleased().toText()
|
||||||
changeLog = changeLog.replace("* ", "• ") // Replace stars with bullets
|
def slackDown = new DownParser(changeLog, true).toSlack().toString()
|
||||||
changeLog = changeLog.replace("**", "*") // Enable bold text
|
def message = """
|
||||||
changeLog = changeLog.replaceAll("\\[([^]]+)]\\(([^)]+)\\)", '<$2|$1>') // Enable links
|
|
||||||
def message ="""
|
|
||||||
{
|
{
|
||||||
"text": "New version of IdeaVim",
|
"text": "New version of IdeaVim",
|
||||||
"blocks": [
|
"blocks": [
|
||||||
@@ -90,7 +162,7 @@ tasks.register("slackEapNotification") {
|
|||||||
"type": "section",
|
"type": "section",
|
||||||
"text": {
|
"text": {
|
||||||
"type": "mrkdwn",
|
"type": "mrkdwn",
|
||||||
"text": "IdeaVim EAP $version has been released\\n$changeLog"
|
"text": "IdeaVim EAP $version has been released\\n$slackDown"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -102,32 +174,8 @@ tasks.register("slackEapNotification") {
|
|||||||
post.getOutputStream().write(message.getBytes("UTF-8"))
|
post.getOutputStream().write(message.getBytes("UTF-8"))
|
||||||
def postRC = post.getResponseCode()
|
def postRC = post.getResponseCode()
|
||||||
println(postRC)
|
println(postRC)
|
||||||
if(postRC == 200) {
|
if (postRC == 200) {
|
||||||
println(post.getInputStream().getText())
|
println(post.getInputStream().getText())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Very primitive changelog extraction code
|
|
||||||
def extractChangelog() {
|
|
||||||
def startLine = "_Available since $version EAP:_"
|
|
||||||
def endLine = "_To Be Released..._"
|
|
||||||
def startSaving = false
|
|
||||||
def res = new StringBuilder()
|
|
||||||
new File("./CHANGES.md").eachLine { line ->
|
|
||||||
if (startSaving) {
|
|
||||||
if (line == endLine) {
|
|
||||||
startSaving = false
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
res.append(line).append('\n')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (line == startLine) {
|
|
||||||
startSaving = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res.toString()
|
|
||||||
}
|
|
||||||
|
1
doc
Submodule
1
doc
Submodule
Submodule doc added at 44ef1a858b
@@ -1,84 +0,0 @@
|
|||||||
Emulated Vim Plugins
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
IdeaVim extensions emulate plugins of the original Vim. In order to use
|
|
||||||
IdeaVim extensions, you have to enable them via this command in your `~/.ideavimrc`:
|
|
||||||
|
|
||||||
set <extension-name>
|
|
||||||
|
|
||||||
Available extensions:
|
|
||||||
|
|
||||||
## easymotion
|
|
||||||
|
|
||||||
* Setup:
|
|
||||||
* Install [IdeaVim-EasyMotion](https://plugins.jetbrains.com/plugin/13360-ideavim-easymotion/)
|
|
||||||
and [AceJump](https://plugins.jetbrains.com/plugin/7086-acejump/) plugins.
|
|
||||||
* `set easymotion`
|
|
||||||
* Emulates [vim-easymotion](https://github.com/easymotion/vim-easymotion)
|
|
||||||
* Commands: All commands with the mappings are supported. See the [full list of supported commands](https://github.com/AlexPl292/IdeaVim-EasyMotion#supported-commands).
|
|
||||||
|
|
||||||
## surround
|
|
||||||
|
|
||||||
* Setup: `set surround`
|
|
||||||
* Emulates [vim-surround](https://github.com/tpope/vim-surround)
|
|
||||||
* Commands: `ys`, `cs`, `ds`, `S`
|
|
||||||
|
|
||||||
## multiple-cursors
|
|
||||||
|
|
||||||
* Setup: `set multiple-cursors`
|
|
||||||
* Emulates [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)
|
|
||||||
* Commands: `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>`
|
|
||||||
|
|
||||||
## commentary
|
|
||||||
|
|
||||||
* Setup: `set commentary`
|
|
||||||
* Emulates [commentary.vim](https://github.com/tpope/vim-commentary)
|
|
||||||
* Commands: `gcc`, `gc + motion`, `v_gc`
|
|
||||||
* By [Daniel Leong](https://github.com/dhleong)
|
|
||||||
|
|
||||||
## ReplaceWithRegister
|
|
||||||
|
|
||||||
* Setup: `set ReplaceWithRegister`
|
|
||||||
* Emulates [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister)
|
|
||||||
* Commands: `gr`, `grr`
|
|
||||||
* By [igrekster](https://github.com/igrekster)
|
|
||||||
|
|
||||||
## argtextobj
|
|
||||||
|
|
||||||
* Setup:
|
|
||||||
* `set argtextobj`
|
|
||||||
* By default, only the arguments inside parenthesis are considered. To extend the functionality
|
|
||||||
to other types of brackets, set `g:argtextobj_pairs` variable to a comma-separated
|
|
||||||
list of colon-separated pairs (same as VIM's `matchpairs` option), like
|
|
||||||
`let g:argtextobj_pairs="(:),{:},<:>"`. The order of pairs matters when
|
|
||||||
handling symbols that can also be operators: `func(x << 5, 20) >> 17`. To handle
|
|
||||||
this syntax parenthesis, must come before angle brackets in the list.
|
|
||||||
* Emulates [argtextobj.vim](https://www.vim.org/scripts/script.php?script_id=2699)
|
|
||||||
* Additional text objects: `aa`, `ia`
|
|
||||||
|
|
||||||
## exchange
|
|
||||||
|
|
||||||
* Setup: `set exchange`
|
|
||||||
* Emulates [vim-exchange](https://github.com/tommcdo/vim-exchange)
|
|
||||||
* Commands: `cx`, `cxx`, `X`, `cxc`
|
|
||||||
* By [fan-tom](https://github.com/fan-tom)
|
|
||||||
|
|
||||||
## textobj-entire
|
|
||||||
|
|
||||||
* Setup: `set textobj-entire`
|
|
||||||
* Emulates [vim-textobj-entire](https://github.com/kana/vim-textobj-entire)
|
|
||||||
* Additional text objects: `ae`, `ie`
|
|
||||||
* By [Alexandre Grison](https://github.com/agrison)
|
|
||||||
|
|
||||||
## highlightedyank
|
|
||||||
|
|
||||||
* Setup:
|
|
||||||
* `set highlightedyank`
|
|
||||||
* if you want to optimize highlight duration, assign a time in milliseconds:
|
|
||||||
`let g:highlightedyank_highlight_duration = "1000"`
|
|
||||||
A negative number makes the highlight persistent.
|
|
||||||
`let g:highlightedyank_highlight_duration = "-1"`
|
|
||||||
* if you want to change background color of highlight you can provide the rgba of the color you want e.g.
|
|
||||||
`let g:highlightedyank_highlight_color = "rgba(160, 160, 160, 155)"`
|
|
||||||
* Emulates [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)
|
|
||||||
* By [KostkaBrukowa](https://github.com/KostkaBrukowa)
|
|
@@ -1,51 +0,0 @@
|
|||||||
Some examples of join command with `ideajoin` option enabled.
|
|
||||||
Put `set ideajoin` to your `~/.ideavimrc` to enable this functionality.
|
|
||||||
|
|
||||||
1) Automatic join concatenated lines:
|
|
||||||
|
|
||||||
```
|
|
||||||
"Hello" + -> "Hello world"
|
|
||||||
" world!"
|
|
||||||
```
|
|
||||||
|
|
||||||
2) Nested if's:
|
|
||||||
|
|
||||||
```
|
|
||||||
if (a) { -> if (a && b) {
|
|
||||||
if (b) { ...
|
|
||||||
... }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3) Remove braces from one line for / if / while:
|
|
||||||
|
|
||||||
```
|
|
||||||
if (fail) { -> if (fail) return;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
4) Kotlin one line method:
|
|
||||||
|
|
||||||
```
|
|
||||||
fun myNumber(): Int { -> fun myNumber(): Int = 42
|
|
||||||
return 42
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
5) Join declaration and initialization:
|
|
||||||
|
|
||||||
```
|
|
||||||
int a; -> int a = 5;
|
|
||||||
a = 5;
|
|
||||||
```
|
|
||||||
|
|
||||||
6) Chain call:
|
|
||||||
|
|
||||||
```
|
|
||||||
sb.append("a"); -> sb.append("a").append("b");
|
|
||||||
sb.append("b");
|
|
||||||
```
|
|
||||||
|
|
||||||
And other functions provided by the plugins.
|
|
@@ -1,141 +0,0 @@
|
|||||||
List of Supported Set Commands
|
|
||||||
==============================
|
|
||||||
|
|
||||||
The following `:set` commands can appear in `~/.ideavimrc` or be set manually in the command mode:
|
|
||||||
|
|
||||||
'clipboard' 'cb' clipboard options
|
|
||||||
Standard clipboard options plus
|
|
||||||
|
|
||||||
`ideaput` (default on) - IdeaVim ONLY
|
|
||||||
enable native idea paste action for put operations
|
|
||||||
|
|
||||||
'digraph' 'dg' enable the entering of digraphs in Insert mode
|
|
||||||
'gdefault' 'gd' the ":substitute" flag 'g' is by default
|
|
||||||
'history' 'hi' number of command-lines that are remembered
|
|
||||||
'hlsearch' 'hls' highlight matches with the last search pattern
|
|
||||||
'ignorecase' 'ic' ignore case in search patterns
|
|
||||||
'iskeyword' 'isk' defines keywords for commands like 'w', '*', etc.
|
|
||||||
'incsearch' 'is' show where search pattern typed so far matches
|
|
||||||
|
|
||||||
`keymodel` `km` String (default "continueselect,stopselect")
|
|
||||||
|
|
||||||
List of comma separated words, which enable special things that keys
|
|
||||||
can do. These values can be used:
|
|
||||||
startsel Using a shifted special[1] key starts selection (either
|
|
||||||
Select mode or Visual mode, depending on "key" being
|
|
||||||
present in 'selectmode').
|
|
||||||
stopsel Using a NOT-shifted special[1] key stops selection.
|
|
||||||
Automatically enables `stopselect` and `stopvisual`
|
|
||||||
stopselect Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
|
||||||
select mode and removes selection.
|
|
||||||
stopvisual Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
|
||||||
visual mode and removes selection.
|
|
||||||
continueselect Using a shifted arrow key doesn't - IdeaVim ONLY
|
|
||||||
start selection, but in select mode
|
|
||||||
acts like startsel is enabled
|
|
||||||
continuevisual Using a shifted arrow key doesn't - IdeaVim ONLY
|
|
||||||
start selection, but in visual mode
|
|
||||||
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
|
|
||||||
the cursor
|
|
||||||
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
|
||||||
'scrolljump' 'sj' minimum number of lines to scroll
|
|
||||||
'scrolloff' 'so' minimum number of lines above and below the cursor
|
|
||||||
'selection' 'sel' what type of selection to use
|
|
||||||
|
|
||||||
`selectmode` `slm` String (default "")
|
|
||||||
|
|
||||||
This is a comma-separated list of words, which specify when to start
|
|
||||||
Select mode instead of Visual mode, when a selection is started.
|
|
||||||
Possible values:
|
|
||||||
mouse when using the mouse
|
|
||||||
key when using shifted special[1] keys
|
|
||||||
cmd when using "v", "V", or <C-V>
|
|
||||||
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
|
|
||||||
'sidescrolloff' 'siso' min. number of columns to left and right of cursor
|
|
||||||
'smartcase' 'scs' no ignore case when pattern is uppercase
|
|
||||||
'timeout' 'to' use timeout for mapped key sequences
|
|
||||||
'timeoutlen' 'tm' timeout duration for a mapped key sequence
|
|
||||||
'undolevels' 'ul' maximum number of changes that can be undone
|
|
||||||
'viminfo' 'vi' information to remember after restart
|
|
||||||
'visualbell' 'vb' use visual bell instead of beeping
|
|
||||||
'wrapscan' 'ws' searches wrap around the end of file
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IdeaVim only commands:
|
|
||||||
|
|
||||||
`ideamarks` `ideamarks` Boolean (default true)
|
|
||||||
|
|
||||||
If true, creation of global mark will trigger creation of IDE's bookmark
|
|
||||||
and vice versa.
|
|
||||||
|
|
||||||
`idearefactormode` `idearefactormode` String(default "select")
|
|
||||||
|
|
||||||
Define the mode that would be enabled during
|
|
||||||
the refactoring (renaming, live template, introduce variable, etc)
|
|
||||||
|
|
||||||
Use one of the following values:
|
|
||||||
- keep - keep the mode that was enabled before starting a refactoring
|
|
||||||
- select - start refactoring in select mode
|
|
||||||
- visual - start refactoring in visual mode
|
|
||||||
|
|
||||||
This option has effect if you are in normal, insert or replace mode before refactoring start.
|
|
||||||
Visual or select mode are not changed.
|
|
||||||
|
|
||||||
|
|
||||||
`ideajoin` `ideajoin` Boolean (default false)
|
|
||||||
|
|
||||||
If true, join command will be performed via IDE
|
|
||||||
See wiki/`ideajoin` examples
|
|
||||||
|
|
||||||
`ideastatusbar` `ideastatusbar` Boolean (default true)
|
|
||||||
DEPRECATED. Please use `ideastatusicon`
|
|
||||||
|
|
||||||
If false, IdeaVim icon won't be shown in the status bar.
|
|
||||||
Works only from `~/.ideavimrc` after the IDE restart.
|
|
||||||
|
|
||||||
`ideastatusicon` `ideastatusicon` String(default "enabled")
|
|
||||||
|
|
||||||
Define the behavior of IdeaVim icon in the status bar.
|
|
||||||
|
|
||||||
Use one of the following values:
|
|
||||||
- enabled - icon is shown in the status bar
|
|
||||||
- gray - use the gray version of the icon
|
|
||||||
- disabled - hide the icon
|
|
||||||
|
|
||||||
`ideawrite` `ideawrite` String (default "all")
|
|
||||||
"file" or "all". Defines the behaviour of ":w" command.
|
|
||||||
Value "all" enables execution of ":wa" (save all) command on ":w" (save).
|
|
||||||
This feature exists because some IJ options like "Prettier on save" or "ESlint on save"
|
|
||||||
work only with "save all" action. If this option is set to "all", these actions work
|
|
||||||
also with ":w" command.
|
|
||||||
|
|
||||||
`lookupkeys` `lookupkeys` List of strings
|
|
||||||
|
|
||||||
List of keys that should be processed by the IDE during the active lookup (autocompletion).
|
|
||||||
For example, <Tab> and <Enter> are used by the IDE to finish the lookup,
|
|
||||||
but <C-W> should be passed to IdeaVim.
|
|
||||||
Default value:
|
|
||||||
"<Tab>", "<Down>", "<Up>", "<Enter>", "<Left>", "<Right>",
|
|
||||||
"<C-Down>", "<C-Up>", "<PageUp>", "<PageDown>",
|
|
||||||
"<C-J>", "<C-Q>"
|
|
||||||
|
|
||||||
----------
|
|
||||||
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
|
@@ -1,9 +1,9 @@
|
|||||||
# suppress inspection "UnusedProperty" for whole file
|
# suppress inspection "UnusedProperty" for whole file
|
||||||
|
|
||||||
ideaVersion=LATEST-EAP-SNAPSHOT
|
ideaVersion=2020.2
|
||||||
downloadIdeaSources=true
|
downloadIdeaSources=true
|
||||||
instrumentPluginCode=true
|
instrumentPluginCode=true
|
||||||
version=SNAPSHOT
|
version=chylex
|
||||||
javaVersion=1.8
|
javaVersion=1.8
|
||||||
kotlinVersion=1.3.71
|
kotlinVersion=1.3.71
|
||||||
publishUsername=username
|
publishUsername=username
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
2
gradlew
vendored
2
gradlew
vendored
@@ -130,7 +130,7 @@ fi
|
|||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
21
gradlew.bat
vendored
21
gradlew.bat
vendored
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@@ -54,7 +54,7 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
@@ -64,21 +64,6 @@ echo location of your Java installation.
|
|||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
@@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
@@ -28,9 +28,9 @@
|
|||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction" mappingModes="NXO" keys="f"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction" mappingModes="NXO" keys="f"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction" mappingModes="NXO" keys="t"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction" mappingModes="NXO" keys="t"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionHomeAction" mappingModes="NV" keys="«Home»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionHomeAction" mappingModes="NV" keys="«Home»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftHomeAction" mappingModes="NV" keys="«S-Home»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftHomeAction" mappingModes="INV" keys="«S-Home»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionEndAction" mappingModes="NVO" keys="«End»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionEndAction" mappingModes="NVO" keys="«End»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftEndAction" mappingModes="NV" keys="«S-End»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftEndAction" mappingModes="INV" keys="«S-End»"/>
|
||||||
<!-- Up/Down -->
|
<!-- Up/Down -->
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" mappingModes="NXO" keys="j"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" mappingModes="NXO" keys="j"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownCtrlNAction" mappingModes="NXO" keys="«C-N»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownCtrlNAction" mappingModes="NXO" keys="«C-N»"/>
|
||||||
@@ -152,10 +152,10 @@
|
|||||||
<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.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.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.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.MotionShiftDownAction" mappingModes="INV" 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.updown.MotionShiftUpAction" mappingModes="INV" keys="«S-Up»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftRightAction" mappingModes="NV" keys="«S-Right»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftRightAction" mappingModes="INV" keys="«S-Right»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftLeftAction" mappingModes="NV" keys="«S-Left»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftLeftAction" mappingModes="INV" keys="«S-Left»"/>
|
||||||
<!-- Visual -->
|
<!-- Visual -->
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" mappingModes="X" keys="«Esc»,«C-[»,«C-C»"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" mappingModes="X" keys="«Esc»,«C-[»,«C-C»"/>
|
||||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" mappingModes="NX" keys="v"/>
|
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" mappingModes="NX" keys="v"/>
|
||||||
|
@@ -25,7 +25,9 @@
|
|||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JoinLinesHandler" names="j[oin]"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JoinLinesHandler" names="j[oin]"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JumpsHandler" names="ju[mps]"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.JumpsHandler" names="ju[mps]"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.LetHandler" names="let"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.LetHandler" names="let"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MapHandler"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.mapping.MapHandler"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.mapping.UnMapHandler"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.mapping.MapClearHandler"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarkHandler" names="ma[rk],k"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarkHandler" names="ma[rk],k"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarksHandler" names="marks"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MarksHandler" names="marks"/>
|
||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MoveTextHandler" names="m[ove]"/>
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.MoveTextHandler" names="m[ove]"/>
|
||||||
@@ -64,5 +66,6 @@
|
|||||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.TabCloseHandler" names="tabc[lose]"/>
|
<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.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.BufferHandler" names="b[uffer]"/>
|
||||||
|
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PlugHandler" names="Plug[in]"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
@@ -1,12 +1,107 @@
|
|||||||
<idea-plugin>
|
<idea-plugin>
|
||||||
<extensions defaultExtensionNs="IdeaVIM">
|
<extensions defaultExtensionNs="IdeaVIM">
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension"/>
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension" name="surround">
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"/>
|
<aliases>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension"/>
|
<alias name="https://github.com/tpope/vim-surround"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.textobjentire.VimTextObjEntireExtension"/>
|
<alias name="tpope/vim-surround"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.argtextobj.VimArgTextObjExtension"/>
|
<alias name="vim-surround"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.replacewithregister.ReplaceWithRegister"/>
|
<alias name="https://www.vim.org/scripts/script.php?script_id=1697"/>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension"/>
|
</aliases>
|
||||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.highlightedyank.VimHighlightedYank"/>
|
</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>
|
||||||
|
|
||||||
|
<vimExtension implementation="com.maddyhome.idea.vim.extension.nerdtree.NerdTree" name="NERDTree">
|
||||||
|
<aliases>
|
||||||
|
<alias name="https://github.com/preservim/nerdtree"/>
|
||||||
|
<alias name="preservim/nerdtree"/>
|
||||||
|
<alias name="https://github.com/scrooloose/nerdtree"/>
|
||||||
|
<alias name="scrooloose/nerdtree"/>
|
||||||
|
<alias name="nerdtree"/>
|
||||||
|
</aliases>
|
||||||
|
</vimExtension>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
|
<!-- IdeaVim extensions-->
|
||||||
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
<projectService serviceImplementation="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$NerdDispatcher"/>
|
||||||
|
</extensions>
|
||||||
|
<projectListeners>
|
||||||
|
<listener class="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$ProjectViewListener"
|
||||||
|
topic="com.intellij.openapi.wm.ex.ToolWindowManagerListener"/>
|
||||||
|
</projectListeners>
|
||||||
|
<applicationListeners>
|
||||||
|
<listener class="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$NerdProjectListener"
|
||||||
|
topic="com.intellij.openapi.project.ProjectManagerListener"/>
|
||||||
|
</applicationListeners>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
<idea-plugin>
|
<idea-plugin>
|
||||||
<applicationListeners>
|
<applicationListeners>
|
||||||
<listener class="com.maddyhome.idea.vim.ui.ExEntryPanel$LafListener"
|
<listener class="com.maddyhome.idea.vim.ui.ex.ExEntryPanel$LafListener"
|
||||||
|
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||||
|
<listener class="com.maddyhome.idea.vim.extension.highlightedyank.HighlightColorResetter"
|
||||||
topic="com.intellij.ide.ui.LafManagerListener"/>
|
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||||
</applicationListeners>
|
</applicationListeners>
|
||||||
<projectListeners>
|
<projectListeners>
|
||||||
|
@@ -1,32 +1,47 @@
|
|||||||
<idea-plugin url="https://plugins.jetbrains.com/plugin/164" xmlns:xi="http://www.w3.org/2001/XInclude">
|
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<name>IdeaVim</name>
|
<name>IdeaVim</name>
|
||||||
<id>IdeaVIM</id>
|
<id>IdeaVIM</id>
|
||||||
<change-notes><![CDATA[
|
<change-notes><![CDATA[
|
||||||
<ul>
|
<h3>Features:</h3>
|
||||||
<li>Support of `virtualedit=onemore`</li>
|
<ul>
|
||||||
<li>A lot of fixes for scrolling</li>
|
<li>Support <code>NERDTree</code> extension <a href="https://youtrack.jetbrains.com/issue/VIM-1042">VIM-1042</a> | <a
|
||||||
</ul>
|
href="https://github.com/preservim/nerdtree">NERDTree</a></li>
|
||||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
<li>Support <code>maxmapdepth</code> option to define the maximum depth of mappings</li>
|
||||||
]]></change-notes>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Fixes:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://youtrack.jetbrains.com/issue/VIM-2202">VIM-2202</a> Fix macro recording for ex command and search
|
||||||
|
</li>
|
||||||
|
<li><a href="https://youtrack.jetbrains.com/issue/VIM-1799">VIM-1799</a>
|
||||||
|
<a href="https://youtrack.jetbrains.com/issue/VIM-179a">VIM-1794</a>
|
||||||
|
Special characters are not interpreted on yanking
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
]]>
|
||||||
|
</change-notes>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<p>Vim emulation plug-in for IDEs based on the IntelliJ platform.</p>
|
<p>Vim emulation plugin for IntelliJ Platform-based IDEs.</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>
|
<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>
|
<p>See also:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://github.com/JetBrains/ideavim">GitHub repository</a>: documentation and contributing</li>
|
<li><a href="https://github.com/JetBrains/ideavim">GitHub repository</a>: documentation and contributing</li>
|
||||||
<li><a href="https://youtrack.jetbrains.com/issues/VIM">Issue tracker</a>: feature requests and bug reports</li>
|
<li><a href="https://youtrack.jetbrains.com/issues/VIM">Issue tracker</a>: feature requests and bug reports</li>
|
||||||
</ul>
|
</ul>
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>SNAPSHOT</version>
|
<version>chylex</version>
|
||||||
<vendor>JetBrains</vendor>
|
<vendor>JetBrains</vendor>
|
||||||
|
|
||||||
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
||||||
<!-- Check for [Version Update] tag in YouTrack as well -->
|
<!-- Check for [Version Update] tag in YouTrack as well -->
|
||||||
<idea-version since-build="201.5985.32"/>
|
<idea-version since-build="202.5103.13"/>
|
||||||
|
|
||||||
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
||||||
<depends>com.intellij.modules.lang</depends>
|
<depends>com.intellij.modules.lang</depends>
|
||||||
<resource-bundle xmlns="">messages</resource-bundle>
|
<resource-bundle>messages.IdeaVimBundle</resource-bundle>
|
||||||
|
|
||||||
<application-components>
|
<application-components>
|
||||||
<component>
|
<component>
|
||||||
@@ -35,7 +50,10 @@
|
|||||||
</application-components>
|
</application-components>
|
||||||
|
|
||||||
<extensionPoints>
|
<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 -->
|
<!-- For internal use only -->
|
||||||
<extensionPoint name="vimExCommand" beanClass="com.maddyhome.idea.vim.ex.ExBeanClass" dynamic="true">
|
<extensionPoint name="vimExCommand" beanClass="com.maddyhome.idea.vim.ex.ExBeanClass" dynamic="true">
|
||||||
@@ -53,7 +71,6 @@
|
|||||||
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.StatusBarIconFactory"/>
|
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.StatusBarIconFactory"/>
|
||||||
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.ShowCmdStatusBarWidgetFactory" order="first"/>
|
<statusBarWidgetFactory implementation="com.maddyhome.idea.vim.ui.ShowCmdStatusBarWidgetFactory" order="first"/>
|
||||||
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.config.VimLocalConfig"/>
|
|
||||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.VimPlugin"/>
|
<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,
|
<!-- Initialise as early as possible so that we're ready to edit quickly. This is especially important for Rider,
|
||||||
@@ -62,6 +79,8 @@
|
|||||||
<postStartupActivity implementation="com.maddyhome.idea.vim.PluginStartup" order="first"/>
|
<postStartupActivity implementation="com.maddyhome.idea.vim.PluginStartup" order="first"/>
|
||||||
|
|
||||||
<editorFloatingToolbarProvider implementation="com.maddyhome.idea.vim.ui.ReloadFloatingToolbar"/>
|
<editorFloatingToolbarProvider implementation="com.maddyhome.idea.vim.ui.ReloadFloatingToolbar"/>
|
||||||
|
|
||||||
|
<actionPromoter implementation="com.maddyhome.idea.vim.key.VimActionsPromoter" order="last"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<xi:include href="/META-INF/includes/ApplicationServices.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
<xi:include href="/META-INF/includes/ApplicationServices.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
@@ -70,7 +89,7 @@
|
|||||||
<xi:include href="/META-INF/includes/VimExtensions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
<xi:include href="/META-INF/includes/VimExtensions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
<xi:include href="/META-INF/includes/VimListeners.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
<xi:include href="/META-INF/includes/VimListeners.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
|
|
||||||
<actions>
|
<actions resource-bundle="messages.IdeaVimBundle">
|
||||||
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.action.VimPluginToggleAction">
|
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.action.VimPluginToggleAction">
|
||||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||||
</action>
|
</action>
|
||||||
@@ -96,8 +115,6 @@
|
|||||||
</action>
|
</action>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<action id="VimFindActionIdAction"
|
<action id="VimFindActionIdAction" class="com.maddyhome.idea.vim.listener.FindActionIdAction"/>
|
||||||
class="com.maddyhome.idea.vim.listener.FindActionIdAction" text="IdeaVim: Track Action Ids"
|
|
||||||
description="Starts tracking ids of executed actions"/>
|
|
||||||
</actions>
|
</actions>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
BIN
resources/contributing/configurations.png
Normal file
BIN
resources/contributing/configurations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
# IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
# Copyright (C) 2003-2020 The IdeaVim authors
|
# Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -72,8 +72,55 @@ E475=E475: Invalid argument: {0}
|
|||||||
E774=E774: 'operatorfunc' is empty
|
E774=E774: 'operatorfunc' is empty
|
||||||
|
|
||||||
action.VimPluginToggle.text=Vim Emulator
|
action.VimPluginToggle.text=Vim Emulator
|
||||||
description.VimPluginToggle.description=Toggle the vim plugin On/off
|
action.VimPluginToggle.description=Toggle the vim plugin On/Off
|
||||||
|
action.VimPluginToggle.enabled=Enabled
|
||||||
|
action.VimPluginToggle.enable=Enable
|
||||||
|
|
||||||
action.VimShortcutKeyAction.text=Shortcuts
|
action.VimShortcutKeyAction.text=Shortcuts
|
||||||
|
|
||||||
action.VimActions.text=Vim Actions
|
action.VimActions.text=Vim Actions
|
||||||
|
action.not.found.0=Action not found: {0}
|
||||||
|
|
||||||
|
action.VimFindActionIdAction.text=IdeaVim: Track Action Ids
|
||||||
|
action.VimFindActionIdAction.description=Starts tracking ids of executed actions
|
||||||
|
|
||||||
|
ex.show.all.actions.0.1=--- Actions ---{0}{1}
|
||||||
|
e471.argument.required=E471: Argument required
|
||||||
|
|
||||||
|
buffer.0.does.not.exist=Buffer {0} does not exist
|
||||||
|
no.matching.buffer.for.0=No matching buffer for {0}
|
||||||
|
no.write.since.last.change.add.to.override=No write since last change (add ! to override)
|
||||||
|
more.than.one.match.for.0=More than one match for {0}
|
||||||
|
e176.invalid.number.of.arguments=E176: Invalid number of arguments
|
||||||
|
e183.user.defined.commands.must.start.with.an.uppercase.letter=E183: User defined commands must start with an uppercase letter
|
||||||
|
e841.reserved.name.cannot.be.used.for.user.defined.command=E841: Reserved name, cannot be used for user defined command
|
||||||
|
e174.command.already.exists.add.to.replace.it=E174: Command already exists: add ! to replace it
|
||||||
|
recursion.detected.maximum.alias.depth.reached=Recursion detected, maximum alias depth reached.
|
||||||
|
show.mode.recording=recording
|
||||||
|
e184.no.such.user.defined.command.0=E184: No such user-defined command: {0}
|
||||||
|
unable.to.find.0=Unable to find {0}
|
||||||
|
more.ret.line.space.page.d.half.page.q.quit=-- MORE -- (RET: line, SPACE: page, d: half page, q: quit)
|
||||||
|
hit.enter.or.type.command.to.continue=Hit ENTER or type command to continue
|
||||||
|
ex.output.panel.more=-- MORE --
|
||||||
|
command.name.vim.macro.playback=Vim Macro Playback
|
||||||
|
action.no.changes.text=No Changes
|
||||||
|
action.reload.text=Reload
|
||||||
|
replace.with.0=Replace with {0} (y/n/a/q/l)?
|
||||||
|
error.invalid.command.argument=Error: invalid command argument
|
||||||
|
argtextobj.invalid.value.of.g.argtextobj.pairs.0=argtextobj: Invalid value of g:argtextobj_pairs -- {0}
|
||||||
|
highlightedyank.invalid.value.of.0.1=highlightedyank: Invalid value of {0} -- {1}
|
||||||
|
could.not.find.file.0=Could not find file: {0}
|
||||||
|
popup.advertisement.version=Version {0}
|
||||||
|
action.eap.choice.active.text=EAP{0, choice, 0# (Active)|1#}
|
||||||
|
action.about.eap.text=About EAP...
|
||||||
|
action.contacts.help.text=Contacts \\&\\& Help
|
||||||
|
action.contact.on.twitter.text=Contact on Twitter
|
||||||
|
action.create.issue.text=Create an Issue
|
||||||
|
action.contribute.on.github.text=Contribute on GitHub
|
||||||
|
action.settings.text=Settings...
|
||||||
|
action.finish.eap.text=Finish EAP
|
||||||
|
action.subscribe.to.eap.text=Subscribe to EAP
|
||||||
|
configurable.name.vim.emulation=Vim Emulation
|
||||||
|
border.title.shortcut.conflicts.for.active.keymap=Shortcut Conflicts for Active Keymap
|
||||||
|
message.no.more.matches=No more matches
|
||||||
|
E223=E223: recursive mapping
|
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 |
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,4 +21,4 @@ package com.maddyhome.idea.vim
|
|||||||
/**
|
/**
|
||||||
* This class prevents dynamic loading of IdeaVim plugin
|
* This class prevents dynamic loading of IdeaVim plugin
|
||||||
*/
|
*/
|
||||||
class DynamicLoaderStopper
|
class DynamicLoaderStopper
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,7 +25,6 @@ import com.intellij.openapi.actionSystem.ShortcutSet;
|
|||||||
import com.intellij.openapi.editor.Document;
|
import com.intellij.openapi.editor.Document;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.EditorFactory;
|
import com.intellij.openapi.editor.EditorFactory;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||||
import com.intellij.openapi.editor.event.*;
|
import com.intellij.openapi.editor.event.*;
|
||||||
@@ -140,6 +139,6 @@ public class EventFacade {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private @NotNull TypedAction getTypedAction() {
|
private @NotNull TypedAction getTypedAction() {
|
||||||
return EditorActionManager.getInstance().getTypedAction();
|
return TypedAction.getInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -26,7 +26,6 @@ import com.intellij.openapi.application.ApplicationManager;
|
|||||||
import com.intellij.openapi.application.ModalityState;
|
import com.intellij.openapi.application.ModalityState;
|
||||||
import com.intellij.openapi.command.CommandProcessor;
|
import com.intellij.openapi.command.CommandProcessor;
|
||||||
import com.intellij.openapi.command.UndoConfirmationPolicy;
|
import com.intellij.openapi.command.UndoConfirmationPolicy;
|
||||||
import com.intellij.openapi.editor.Caret;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
||||||
import com.intellij.openapi.editor.actionSystem.DocCommandGroupId;
|
import com.intellij.openapi.editor.actionSystem.DocCommandGroupId;
|
||||||
@@ -39,18 +38,16 @@ import com.maddyhome.idea.vim.action.change.insert.InsertCompletedDigraphAction;
|
|||||||
import com.maddyhome.idea.vim.action.change.insert.InsertCompletedLiteralAction;
|
import com.maddyhome.idea.vim.action.change.insert.InsertCompletedLiteralAction;
|
||||||
import com.maddyhome.idea.vim.action.macro.ToggleRecordingAction;
|
import com.maddyhome.idea.vim.action.macro.ToggleRecordingAction;
|
||||||
import com.maddyhome.idea.vim.command.*;
|
import com.maddyhome.idea.vim.command.*;
|
||||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler;
|
|
||||||
import com.maddyhome.idea.vim.group.ChangeGroup;
|
import com.maddyhome.idea.vim.group.ChangeGroup;
|
||||||
import com.maddyhome.idea.vim.group.RegisterGroup;
|
import com.maddyhome.idea.vim.group.RegisterGroup;
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection;
|
|
||||||
import com.maddyhome.idea.vim.group.visual.VisualGroupKt;
|
import com.maddyhome.idea.vim.group.visual.VisualGroupKt;
|
||||||
|
import com.maddyhome.idea.vim.handler.ActionBeanClass;
|
||||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase;
|
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase;
|
||||||
import com.maddyhome.idea.vim.helper.*;
|
import com.maddyhome.idea.vim.helper.*;
|
||||||
import com.maddyhome.idea.vim.key.*;
|
import com.maddyhome.idea.vim.key.*;
|
||||||
import com.maddyhome.idea.vim.listener.SelectionVimListenerSuppressor;
|
|
||||||
import com.maddyhome.idea.vim.listener.VimListenerSuppressor;
|
|
||||||
import com.maddyhome.idea.vim.option.OptionsManager;
|
import com.maddyhome.idea.vim.option.OptionsManager;
|
||||||
import com.maddyhome.idea.vim.ui.ShowCmd;
|
import com.maddyhome.idea.vim.ui.ShowCmd;
|
||||||
|
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
|
||||||
import org.jetbrains.annotations.Contract;
|
import org.jetbrains.annotations.Contract;
|
||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -58,13 +55,12 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static com.intellij.openapi.actionSystem.CommonDataKeys.*;
|
import static com.intellij.openapi.actionSystem.CommonDataKeys.*;
|
||||||
import static com.intellij.openapi.actionSystem.PlatformDataKeys.PROJECT_FILE_DIRECTORY;
|
import static com.intellij.openapi.actionSystem.PlatformDataKeys.PROJECT_FILE_DIRECTORY;
|
||||||
@@ -167,7 +163,7 @@ public class KeyHandler {
|
|||||||
* @param context The data context
|
* @param context The data context
|
||||||
*/
|
*/
|
||||||
public void handleKey(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context) {
|
public void handleKey(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context) {
|
||||||
handleKey(editor, key, context, true);
|
handleKey(editor, key, context, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -192,10 +188,25 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handling input keys with additional parameters
|
||||||
|
*
|
||||||
|
* @param allowKeyMappings - If we allow key mappings or not
|
||||||
|
* @param mappingCompleted - if true, we don't check if the mapping is incomplete
|
||||||
|
*
|
||||||
|
* TODO mappingCompleted and recursionCounter - we should find a more beautiful way to use them
|
||||||
|
*/
|
||||||
public void handleKey(@NotNull Editor editor,
|
public void handleKey(@NotNull Editor editor,
|
||||||
@NotNull KeyStroke key,
|
@NotNull KeyStroke key,
|
||||||
@NotNull DataContext context,
|
@NotNull DataContext context,
|
||||||
boolean allowKeyMappings) {
|
boolean allowKeyMappings,
|
||||||
|
boolean mappingCompleted) {
|
||||||
|
if (handleKeyRecursionCount >= OptionsManager.INSTANCE.getMaxmapdepth().value()) {
|
||||||
|
VimPlugin.showMessage(MessageHelper.message("E223"));
|
||||||
|
VimPlugin.indicateError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
VimPlugin.clearError();
|
VimPlugin.clearError();
|
||||||
// All the editor actions should be performed with top level editor!!!
|
// All the editor actions should be performed with top level editor!!!
|
||||||
// Be careful: all the EditorActionHandler implementation should correctly process InjectedEditors
|
// Be careful: all the EditorActionHandler implementation should correctly process InjectedEditors
|
||||||
@@ -212,7 +223,7 @@ public class KeyHandler {
|
|||||||
handleKeyRecursionCount++;
|
handleKeyRecursionCount++;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!allowKeyMappings || !handleKeyMapping(editor, key, context)) {
|
if (!allowKeyMappings || !handleKeyMapping(editor, key, context, mappingCompleted)) {
|
||||||
if (isCommandCountKey(chKey, editorState)) {
|
if (isCommandCountKey(chKey, editorState)) {
|
||||||
commandBuilder.addCountCharacter(key);
|
commandBuilder.addCountCharacter(key);
|
||||||
} else if (isDeleteCommandCountKey(key, editorState)) {
|
} else if (isDeleteCommandCountKey(key, editorState)) {
|
||||||
@@ -234,13 +245,13 @@ public class KeyHandler {
|
|||||||
else if (!handleDigraph(editor, key, context, editorState)) {
|
else if (!handleDigraph(editor, key, context, editorState)) {
|
||||||
// Ask the key/action tree if this is an appropriate key at this point in the command and if so,
|
// Ask the key/action tree if this is an appropriate key at this point in the command and if so,
|
||||||
// return the node matching this keystroke
|
// return the node matching this keystroke
|
||||||
final Node node = mapOpCommand(key, commandBuilder.getChildNode(key), editorState);
|
final Node<ActionBeanClass> node = mapOpCommand(key, commandBuilder.getChildNode(key), editorState);
|
||||||
|
|
||||||
if (node instanceof CommandNode) {
|
if (node instanceof CommandNode) {
|
||||||
handleCommandNode(editor, context, key, (CommandNode) node, editorState);
|
handleCommandNode(editor, context, key, (CommandNode<ActionBeanClass>) node, editorState);
|
||||||
commandBuilder.addKey(key);
|
commandBuilder.addKey(key);
|
||||||
} else if (node instanceof CommandPartNode) {
|
} else if (node instanceof CommandPartNode) {
|
||||||
commandBuilder.setCurrentCommandPartNode((CommandPartNode) node);
|
commandBuilder.setCurrentCommandPartNode((CommandPartNode<ActionBeanClass>) node);
|
||||||
commandBuilder.addKey(key);
|
commandBuilder.addKey(key);
|
||||||
} else if (isSelectRegister(key, editorState)) {
|
} else if (isSelectRegister(key, editorState)) {
|
||||||
editorState.pushModes(CommandState.Mode.COMMAND, CommandState.SubMode.REGISTER_PENDING);
|
editorState.pushModes(CommandState.Mode.COMMAND, CommandState.SubMode.REGISTER_PENDING);
|
||||||
@@ -293,14 +304,14 @@ public class KeyHandler {
|
|||||||
/**
|
/**
|
||||||
* See the description for {@link com.maddyhome.idea.vim.action.DuplicableOperatorAction}
|
* See the description for {@link com.maddyhome.idea.vim.action.DuplicableOperatorAction}
|
||||||
*/
|
*/
|
||||||
private Node mapOpCommand(KeyStroke key, Node node, @NotNull CommandState editorState) {
|
private Node<ActionBeanClass> mapOpCommand(KeyStroke key, Node<ActionBeanClass> node, @NotNull CommandState editorState) {
|
||||||
if (editorState.isDuplicateOperatorKeyStroke(key)) {
|
if (editorState.isDuplicateOperatorKeyStroke(key)) {
|
||||||
return editorState.getCommandBuilder().getChildNode(KeyStroke.getKeyStroke('_'));
|
return editorState.getCommandBuilder().getChildNode(KeyStroke.getKeyStroke('_'));
|
||||||
}
|
}
|
||||||
return node;
|
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()) {
|
if (list1.size() > list2.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -329,7 +340,8 @@ public class KeyHandler {
|
|||||||
|
|
||||||
private boolean handleKeyMapping(final @NotNull Editor editor,
|
private boolean handleKeyMapping(final @NotNull Editor editor,
|
||||||
final @NotNull KeyStroke key,
|
final @NotNull KeyStroke key,
|
||||||
final @NotNull DataContext context) {
|
final @NotNull DataContext context,
|
||||||
|
boolean mappingCompleted) {
|
||||||
|
|
||||||
final CommandState commandState = CommandState.getInstance(editor);
|
final CommandState commandState = CommandState.getInstance(editor);
|
||||||
final MappingState mappingState = commandState.getMappingState();
|
final MappingState mappingState = commandState.getMappingState();
|
||||||
@@ -351,8 +363,8 @@ public class KeyHandler {
|
|||||||
|
|
||||||
// Returns true if any of these methods handle the key. False means that the key is unrelated to mapping and should
|
// Returns true if any of these methods handle the key. False means that the key is unrelated to mapping and should
|
||||||
// be processed as normal.
|
// be processed as normal.
|
||||||
return handleUnfinishedMappingSequence(editor, mappingState, mapping)
|
return (handleUnfinishedMappingSequence(editor, mappingState, mapping, mappingCompleted))
|
||||||
|| handleCompleteMappingSequence(editor, context, commandState, mappingState, mapping, key)
|
|| handleCompleteMappingSequence(editor, context, mappingState, mapping, key)
|
||||||
|| handleAbandonedMappingSequence(editor, mappingState, context);
|
|| handleAbandonedMappingSequence(editor, mappingState, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +377,10 @@ public class KeyHandler {
|
|||||||
|
|
||||||
private boolean handleUnfinishedMappingSequence(@NotNull Editor editor,
|
private boolean handleUnfinishedMappingSequence(@NotNull Editor editor,
|
||||||
@NotNull MappingState mappingState,
|
@NotNull MappingState mappingState,
|
||||||
@NotNull KeyMapping mapping) {
|
@NotNull KeyMapping mapping,
|
||||||
|
boolean mappingCompleted) {
|
||||||
|
if (mappingCompleted) return false;
|
||||||
|
|
||||||
// Is there at least one mapping that starts with the current sequence? This does not include complete matches,
|
// Is there at least one mapping that starts with the current sequence? This does not include complete matches,
|
||||||
// unless a sequence is also a prefix for another mapping. We eagerly evaluate the shortest mapping, so even if a
|
// unless a sequence is also a prefix for another mapping. We eagerly evaluate the shortest mapping, so even if a
|
||||||
// mapping is a prefix, it will get evaluated when the next character is entered.
|
// mapping is a prefix, it will get evaluated when the next character is entered.
|
||||||
@@ -380,19 +395,17 @@ public class KeyHandler {
|
|||||||
// user has typed "dw" wait for the timeout, and then replay "d" and "w" without any mapping (which will of course
|
// user has typed "dw" wait for the timeout, and then replay "d" and "w" without any mapping (which will of course
|
||||||
// delete a word)
|
// delete a word)
|
||||||
final Application application = ApplicationManager.getApplication();
|
final Application application = ApplicationManager.getApplication();
|
||||||
if (!application.isUnitTestMode() && OptionsManager.INSTANCE.getTimeout().isSet()) {
|
if (OptionsManager.INSTANCE.getTimeout().isSet()) {
|
||||||
mappingState.startMappingTimer(actionEvent -> application.invokeLater(() -> {
|
mappingState.startMappingTimer(actionEvent -> application.invokeLater(() -> {
|
||||||
|
|
||||||
final List<KeyStroke> unhandledKeys = mappingState.detachKeys();
|
final List<KeyStroke> unhandledKeys = mappingState.detachKeys();
|
||||||
|
|
||||||
// TODO: I'm not sure why we abandon plugin commands here
|
if (editor.isDisposed() || isPluginMapping(unhandledKeys)) {
|
||||||
// Would be useful to have a comment or a helpfully named helper method here
|
|
||||||
if (editor.isDisposed() || unhandledKeys.get(0).equals(StringHelper.PlugKeyStroke)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (KeyStroke keyStroke : unhandledKeys) {
|
for (KeyStroke keyStroke : unhandledKeys) {
|
||||||
handleKey(editor, keyStroke, new EditorDataContext(editor), false);
|
handleKey(editor, keyStroke, EditorDataContext.init(editor, null), true, true);
|
||||||
}
|
}
|
||||||
}, ModalityState.stateForComponent(editor.getComponent())));
|
}, ModalityState.stateForComponent(editor.getComponent())));
|
||||||
}
|
}
|
||||||
@@ -402,7 +415,6 @@ public class KeyHandler {
|
|||||||
|
|
||||||
private boolean handleCompleteMappingSequence(@NotNull Editor editor,
|
private boolean handleCompleteMappingSequence(@NotNull Editor editor,
|
||||||
@NotNull DataContext context,
|
@NotNull DataContext context,
|
||||||
@NotNull CommandState commandState,
|
|
||||||
@NotNull MappingState mappingState,
|
@NotNull MappingState mappingState,
|
||||||
@NotNull KeyMapping mapping,
|
@NotNull KeyMapping mapping,
|
||||||
KeyStroke key) {
|
KeyStroke key) {
|
||||||
@@ -435,84 +447,13 @@ public class KeyHandler {
|
|||||||
|
|
||||||
mappingState.resetMappingSequence();
|
mappingState.resetMappingSequence();
|
||||||
|
|
||||||
final EditorDataContext currentContext = new EditorDataContext(editor);
|
final EditorDataContext currentContext = EditorDataContext.init(editor, context);
|
||||||
|
|
||||||
if (mappingInfo instanceof ToKeysMappingInfo) {
|
mappingInfo.execute(editor, context);
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we've just evaluated the previous key sequence, make sure to also handle the current key
|
// If we've just evaluated the previous key sequence, make sure to also handle the current key
|
||||||
if (mappingInfo != currentMappingInfo) {
|
if (mappingInfo != currentMappingInfo) {
|
||||||
handleKey(editor, key, currentContext, true);
|
handleKey(editor, key, currentContext, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -540,27 +481,30 @@ public class KeyHandler {
|
|||||||
// If user enters `dI`, the first `d` will be caught be this handler because it's a prefix for `ds` command.
|
// If user enters `dI`, the first `d` will be caught be this handler because it's a prefix for `ds` command.
|
||||||
// After the user enters `I`, the caught `d` should be processed without mapping, and the rest of keys
|
// After the user enters `I`, the caught `d` should be processed without mapping, and the rest of keys
|
||||||
// should be processed with mappings (to make I work)
|
// should be processed with mappings (to make I work)
|
||||||
//
|
|
||||||
// Additionally, the <Plug>mappings are not executed if the fail to map to something.
|
|
||||||
// E.g.
|
|
||||||
// - map <Plug>iA someAction
|
|
||||||
// - map I <Plug>i
|
|
||||||
// For `IA` someAction should be executed.
|
|
||||||
// But if the user types `Ib`, `<Plug>i` won't be executed again. Only `b` will be passed to keyHandler.
|
|
||||||
|
|
||||||
if (unhandledKeyStrokes.get(0).equals(StringHelper.PlugKeyStroke)) {
|
if (isPluginMapping(unhandledKeyStrokes)) {
|
||||||
handleKey(editor, unhandledKeyStrokes.get(unhandledKeyStrokes.size() - 1), context, true);
|
handleKey(editor, unhandledKeyStrokes.get(unhandledKeyStrokes.size() - 1), context, true, false);
|
||||||
} else {
|
} else {
|
||||||
handleKey(editor, unhandledKeyStrokes.get(0), context, false);
|
handleKey(editor, unhandledKeyStrokes.get(0), context, false, false);
|
||||||
|
|
||||||
for (KeyStroke keyStroke : unhandledKeyStrokes.subList(1, unhandledKeyStrokes.size())) {
|
for (KeyStroke keyStroke : unhandledKeyStrokes.subList(1, unhandledKeyStrokes.size())) {
|
||||||
handleKey(editor, keyStroke, context, true);
|
handleKey(editor, keyStroke, context, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The <Plug>mappings are not executed if they fail to map to something.
|
||||||
|
// E.g.
|
||||||
|
// - map <Plug>iA someAction
|
||||||
|
// - map I <Plug>i
|
||||||
|
// For `IA` someAction should be executed.
|
||||||
|
// But if the user types `Ib`, `<Plug>i` won't be executed again. Only `b` will be passed to keyHandler.
|
||||||
|
private boolean isPluginMapping(List<KeyStroke> unhandledKeyStrokes) {
|
||||||
|
return unhandledKeyStrokes.get(0).equals(StringHelper.PlugKeyStroke);
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("RedundantIfStatement")
|
@SuppressWarnings("RedundantIfStatement")
|
||||||
private boolean isCommandCountKey(char chKey, @NotNull CommandState editorState) {
|
private boolean isCommandCountKey(char chKey, @NotNull CommandState editorState) {
|
||||||
// Make sure to avoid handling '0' as the start of a count.
|
// Make sure to avoid handling '0' as the start of a count.
|
||||||
@@ -669,6 +613,22 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DigraphResult res = editorState.processDigraphKey(key, editor);
|
DigraphResult res = editorState.processDigraphKey(key, editor);
|
||||||
|
if (ExEntryPanel.getInstance().isActive()) {
|
||||||
|
switch (res.getResult()) {
|
||||||
|
case DigraphResult.RES_HANDLED:
|
||||||
|
setPromptCharacterEx(commandBuilder.isPuttingLiteral() ? '^' : key.getKeyChar());
|
||||||
|
break;
|
||||||
|
case DigraphResult.RES_DONE:
|
||||||
|
case DigraphResult.RES_BAD:
|
||||||
|
if (key.getKeyCode() == KeyEvent.VK_C && (key.getModifiers() & InputEvent.CTRL_DOWN_MASK) != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
ExEntryPanel.getInstance().getEntry().clearCurrentAction();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (res.getResult()) {
|
switch (res.getResult()) {
|
||||||
case DigraphResult.RES_HANDLED:
|
case DigraphResult.RES_HANDLED:
|
||||||
editorState.getCommandBuilder().addKey(key);
|
editorState.getCommandBuilder().addKey(key);
|
||||||
@@ -749,10 +709,10 @@ public class KeyHandler {
|
|||||||
private void handleCommandNode(Editor editor,
|
private void handleCommandNode(Editor editor,
|
||||||
DataContext context,
|
DataContext context,
|
||||||
KeyStroke key,
|
KeyStroke key,
|
||||||
@NotNull CommandNode node,
|
@NotNull CommandNode<ActionBeanClass> node,
|
||||||
CommandState editorState) {
|
CommandState editorState) {
|
||||||
// The user entered a valid command. Create the command and add it to the stack.
|
// The user entered a valid command. Create the command and add it to the stack.
|
||||||
final EditorActionHandlerBase action = node.getActionHolder().getAction();
|
final EditorActionHandlerBase action = node.getActionHolder().getInstance();
|
||||||
final CommandBuilder commandBuilder = editorState.getCommandBuilder();
|
final CommandBuilder commandBuilder = editorState.getCommandBuilder();
|
||||||
final Argument.Type expectedArgumentType = commandBuilder.getExpectedArgumentType();
|
final Argument.Type expectedArgumentType = commandBuilder.getExpectedArgumentType();
|
||||||
|
|
||||||
@@ -798,8 +758,8 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean stopMacroRecord(CommandNode node, @NotNull CommandState editorState) {
|
private boolean stopMacroRecord(CommandNode<ActionBeanClass> node, @NotNull CommandState editorState) {
|
||||||
return editorState.isRecording() && node.getActionHolder().getAction() instanceof ToggleRecordingAction;
|
return editorState.isRecording() && node.getActionHolder().getInstance() instanceof ToggleRecordingAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startWaitingForArgument(Editor editor,
|
private void startWaitingForArgument(Editor editor,
|
||||||
@@ -823,8 +783,10 @@ public class KeyHandler {
|
|||||||
// the key handler when it's complete.
|
// the key handler when it's complete.
|
||||||
if (action instanceof InsertCompletedDigraphAction) {
|
if (action instanceof InsertCompletedDigraphAction) {
|
||||||
editorState.startDigraphSequence();
|
editorState.startDigraphSequence();
|
||||||
|
setPromptCharacterEx('?');
|
||||||
} else if (action instanceof InsertCompletedLiteralAction) {
|
} else if (action instanceof InsertCompletedLiteralAction) {
|
||||||
editorState.startLiteralSequence();
|
editorState.startLiteralSequence();
|
||||||
|
setPromptCharacterEx('^');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EX_STRING:
|
case EX_STRING:
|
||||||
@@ -847,7 +809,7 @@ public class KeyHandler {
|
|||||||
* @param name The name of the action to execute
|
* @param name The name of the action to execute
|
||||||
* @param context The context to run it in
|
* @param context The context to run it in
|
||||||
*/
|
*/
|
||||||
public static boolean executeAction(@NotNull String name, @NotNull DataContext context) {
|
public static boolean executeAction(@NotNull @NonNls String name, @NotNull DataContext context) {
|
||||||
ActionManager aMgr = ActionManager.getInstance();
|
ActionManager aMgr = ActionManager.getInstance();
|
||||||
AnAction action = aMgr.getAction(name);
|
AnAction action = aMgr.getAction(name);
|
||||||
return action != null && executeAction(action, context);
|
return action != null && executeAction(action, context);
|
||||||
@@ -859,7 +821,7 @@ public class KeyHandler {
|
|||||||
*
|
*
|
||||||
* @param editor The editor to reset.
|
* @param editor The editor to reset.
|
||||||
*/
|
*/
|
||||||
public void partialReset(@Nullable Editor editor) {
|
public void partialReset(@NotNull Editor editor) {
|
||||||
CommandState editorState = CommandState.getInstance(editor);
|
CommandState editorState = CommandState.getInstance(editor);
|
||||||
editorState.getMappingState().resetMappingSequence();
|
editorState.getMappingState().resetMappingSequence();
|
||||||
editorState.getCommandBuilder().resetInProgressCommandPart(getKeyRoot(editorState.getMappingState().getMappingMode()));
|
editorState.getCommandBuilder().resetInProgressCommandPart(getKeyRoot(editorState.getMappingState().getMappingMode()));
|
||||||
@@ -870,13 +832,13 @@ public class KeyHandler {
|
|||||||
*
|
*
|
||||||
* @param editor The editor to reset.
|
* @param editor The editor to reset.
|
||||||
*/
|
*/
|
||||||
public void reset(@Nullable Editor editor) {
|
public void reset(@NotNull Editor editor) {
|
||||||
partialReset(editor);
|
partialReset(editor);
|
||||||
CommandState editorState = CommandState.getInstance(editor);
|
CommandState editorState = CommandState.getInstance(editor);
|
||||||
editorState.getCommandBuilder().resetAll(getKeyRoot(editorState.getMappingState().getMappingMode()));
|
editorState.getCommandBuilder().resetAll(getKeyRoot(editorState.getMappingState().getMappingMode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private @NotNull CommandPartNode getKeyRoot(MappingMode mappingMode) {
|
private @NotNull CommandPartNode<ActionBeanClass> getKeyRoot(MappingMode mappingMode) {
|
||||||
return VimPlugin.getKey().getKeyRoot(mappingMode);
|
return VimPlugin.getKey().getKeyRoot(mappingMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -886,7 +848,7 @@ public class KeyHandler {
|
|||||||
*
|
*
|
||||||
* @param editor The editor to reset.
|
* @param editor The editor to reset.
|
||||||
*/
|
*/
|
||||||
public void fullReset(@Nullable Editor editor) {
|
public void fullReset(@NotNull Editor editor) {
|
||||||
VimPlugin.clearError();
|
VimPlugin.clearError();
|
||||||
CommandState.getInstance(editor).reset();
|
CommandState.getInstance(editor).reset();
|
||||||
reset(editor);
|
reset(editor);
|
||||||
@@ -894,10 +856,8 @@ public class KeyHandler {
|
|||||||
if (registerGroup != null) {
|
if (registerGroup != null) {
|
||||||
registerGroup.resetRegister();
|
registerGroup.resetRegister();
|
||||||
}
|
}
|
||||||
if (editor != null) {
|
VisualGroupKt.updateCaretState(editor);
|
||||||
VisualGroupKt.updateCaretState(editor);
|
editor.getSelectionModel().removeSelection();
|
||||||
editor.getSelectionModel().removeSelection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is copied from com.intellij.openapi.editor.actionSystem.EditorAction.getProjectAwareDataContext
|
// This method is copied from com.intellij.openapi.editor.actionSystem.EditorAction.getProjectAwareDataContext
|
||||||
@@ -919,6 +879,13 @@ public class KeyHandler {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setPromptCharacterEx(final char promptCharacter) {
|
||||||
|
final ExEntryPanel exEntryPanel = ExEntryPanel.getInstance();
|
||||||
|
if (exEntryPanel.isActive()) {
|
||||||
|
exEntryPanel.getEntry().setCurrentActionPromptCharacter(promptCharacter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This class is copied from com.intellij.openapi.editor.actionSystem.DialogAwareDataContext.DialogAwareDataContext
|
// This class is copied from com.intellij.openapi.editor.actionSystem.DialogAwareDataContext.DialogAwareDataContext
|
||||||
private static final class DialogAwareDataContext implements DataContext {
|
private static final class DialogAwareDataContext implements DataContext {
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@@ -985,9 +952,12 @@ public class KeyHandler {
|
|||||||
if (editorState.getSubMode() == CommandState.SubMode.SINGLE_COMMAND &&
|
if (editorState.getSubMode() == CommandState.SubMode.SINGLE_COMMAND &&
|
||||||
(!cmd.getFlags().contains(CommandFlags.FLAG_EXPECT_MORE))) {
|
(!cmd.getFlags().contains(CommandFlags.FLAG_EXPECT_MORE))) {
|
||||||
editorState.popModes();
|
editorState.popModes();
|
||||||
|
VisualGroupKt.resetShape(CommandStateHelper.getMode(editor), editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyHandler.getInstance().reset(editor);
|
if (editorState.getCommandBuilder().isDone()) {
|
||||||
|
KeyHandler.getInstance().reset(editor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Editor editor;
|
private final Editor editor;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,7 +25,7 @@ import com.maddyhome.idea.vim.listener.VimListenerManager
|
|||||||
/**
|
/**
|
||||||
* @author Alex Plate
|
* @author Alex Plate
|
||||||
*/
|
*/
|
||||||
class PluginStartup : StartupActivity.DumbAware {
|
class PluginStartup : StartupActivity.DumbAware/*, LightEditCompatible*/ {
|
||||||
|
|
||||||
private var firstInitializationOccurred = false
|
private var firstInitializationOccurred = false
|
||||||
|
|
||||||
@@ -42,4 +42,4 @@ class PluginStartup : StartupActivity.DumbAware {
|
|||||||
// This code should be executed once
|
// This code should be executed once
|
||||||
VimPlugin.getInstance().initialize()
|
VimPlugin.getInstance().initialize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -53,7 +53,7 @@ public class RegisterActions {
|
|||||||
|
|
||||||
public static @Nullable EditorActionHandlerBase findAction(@NotNull String id) {
|
public static @Nullable EditorActionHandlerBase findAction(@NotNull String id) {
|
||||||
return VIM_ACTIONS_EP.extensions().filter(vimActionBean -> vimActionBean.getActionId().equals(id)).findFirst()
|
return VIM_ACTIONS_EP.extensions().filter(vimActionBean -> vimActionBean.getActionId().equals(id)).findFirst()
|
||||||
.map(ActionBeanClass::getAction).orElse(null);
|
.map(ActionBeanClass::getInstance).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull EditorActionHandlerBase findActionOrDie(@NotNull String id) {
|
public static @NotNull EditorActionHandlerBase findActionOrDie(@NotNull String id) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||||||
import com.intellij.ide.plugins.PluginManager;
|
import com.intellij.ide.plugins.PluginManagerCore;
|
||||||
import com.intellij.notification.Notification;
|
import com.intellij.notification.Notification;
|
||||||
import com.intellij.notification.NotificationListener;
|
import com.intellij.notification.NotificationListener;
|
||||||
import com.intellij.openapi.Disposable;
|
import com.intellij.openapi.Disposable;
|
||||||
@@ -40,7 +40,6 @@ import com.intellij.openapi.ui.Messages;
|
|||||||
import com.intellij.openapi.util.SystemInfo;
|
import com.intellij.openapi.util.SystemInfo;
|
||||||
import com.intellij.openapi.wm.StatusBar;
|
import com.intellij.openapi.wm.StatusBar;
|
||||||
import com.intellij.openapi.wm.WindowManager;
|
import com.intellij.openapi.wm.WindowManager;
|
||||||
import com.maddyhome.idea.vim.config.VimLocalConfig;
|
|
||||||
import com.maddyhome.idea.vim.config.VimState;
|
import com.maddyhome.idea.vim.config.VimState;
|
||||||
import com.maddyhome.idea.vim.config.migration.ApplicationConfigurationMigrator;
|
import com.maddyhome.idea.vim.config.migration.ApplicationConfigurationMigrator;
|
||||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
import com.maddyhome.idea.vim.ex.CommandParser;
|
||||||
@@ -53,10 +52,10 @@ import com.maddyhome.idea.vim.group.visual.VisualMotionGroup;
|
|||||||
import com.maddyhome.idea.vim.helper.MacKeyRepeat;
|
import com.maddyhome.idea.vim.helper.MacKeyRepeat;
|
||||||
import com.maddyhome.idea.vim.listener.VimListenerManager;
|
import com.maddyhome.idea.vim.listener.VimListenerManager;
|
||||||
import com.maddyhome.idea.vim.option.OptionsManager;
|
import com.maddyhome.idea.vim.option.OptionsManager;
|
||||||
import com.maddyhome.idea.vim.ui.ExEntryPanel;
|
|
||||||
import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
import com.maddyhome.idea.vim.ui.StatusBarIconFactory;
|
||||||
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable;
|
import com.maddyhome.idea.vim.ui.VimEmulationConfigurable;
|
||||||
import com.maddyhome.idea.vim.ui.VimRcFileState;
|
import com.maddyhome.idea.vim.ui.VimRcFileState;
|
||||||
|
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
import org.jetbrains.annotations.Nls;
|
import org.jetbrains.annotations.Nls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -105,11 +104,6 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
public void initialize() {
|
public void initialize() {
|
||||||
LOG.debug("initComponent");
|
LOG.debug("initComponent");
|
||||||
|
|
||||||
// Initialize a legacy local config.
|
|
||||||
if (previousStateVersion == 5) {
|
|
||||||
//noinspection deprecation
|
|
||||||
VimLocalConfig.Companion.initialize();
|
|
||||||
}
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
Application application = ApplicationManager.getApplication();
|
Application application = ApplicationManager.getApplication();
|
||||||
if (application.isUnitTestMode()) {
|
if (application.isUnitTestMode()) {
|
||||||
@@ -168,7 +162,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable RegisterGroup getRegisterIfCreated() {
|
public static @Nullable RegisterGroup getRegisterIfCreated() {
|
||||||
return ServiceManager.getServiceIfCreated(RegisterGroup.class);
|
return ApplicationManager.getApplication().getServiceIfCreated(RegisterGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull FileGroup getFile() {
|
public static @NotNull FileGroup getFile() {
|
||||||
@@ -180,7 +174,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable SearchGroup getSearchIfCreated() {
|
public static @Nullable SearchGroup getSearchIfCreated() {
|
||||||
return ServiceManager.getServiceIfCreated(SearchGroup.class);
|
return ApplicationManager.getApplication().getServiceIfCreated(SearchGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull ProcessGroup getProcess() {
|
public static @NotNull ProcessGroup getProcess() {
|
||||||
@@ -204,7 +198,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable KeyGroup getKeyIfCreated() {
|
public static @Nullable KeyGroup getKeyIfCreated() {
|
||||||
return ServiceManager.getServiceIfCreated(KeyGroup.class);
|
return ApplicationManager.getApplication().getServiceIfCreated(KeyGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull WindowGroup getWindow() {
|
public static @NotNull WindowGroup getWindow() {
|
||||||
@@ -216,7 +210,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable EditorGroup getEditorIfCreated() {
|
public static @Nullable EditorGroup getEditorIfCreated() {
|
||||||
return ServiceManager.getServiceIfCreated(EditorGroup.class);
|
return ApplicationManager.getApplication().getServiceIfCreated(EditorGroup.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull VisualMotionGroup getVisualMotion() {
|
public static @NotNull VisualMotionGroup getVisualMotion() {
|
||||||
@@ -242,7 +236,13 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
ideavimrcRegistered = true;
|
ideavimrcRegistered = true;
|
||||||
|
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
executeIdeaVimRc();
|
try {
|
||||||
|
VimScriptParser.INSTANCE.setExecutingVimScript(true);
|
||||||
|
executeIdeaVimRc();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
VimScriptParser.INSTANCE.setExecutingVimScript(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull String getVersion() {
|
public static @NotNull String getVersion() {
|
||||||
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(getPluginId());
|
final IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(getPluginId());
|
||||||
if (!ApplicationManager.getApplication().isInternal()) {
|
if (!ApplicationManager.getApplication().isInternal()) {
|
||||||
return plugin != null ? plugin.getVersion() : "SNAPSHOT";
|
return plugin != null ? plugin.getVersion() : "SNAPSHOT";
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
showMessage(msg);
|
showMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showMessage(@Nls @Nullable String msg) {
|
public static void showMessage(@Nls(capitalization = Nls.Capitalization.Sentence) @Nullable String msg) {
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
getInstance().message = msg;
|
getInstance().message = msg;
|
||||||
}
|
}
|
||||||
@@ -357,7 +357,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
RegisterActions.registerActions();
|
RegisterActions.registerActions();
|
||||||
|
|
||||||
// Register ex handlers
|
// Register ex handlers
|
||||||
CommandParser.getInstance().registerHandlers();
|
CommandParser.INSTANCE.registerHandlers();
|
||||||
|
|
||||||
// Register extensions
|
// Register extensions
|
||||||
VimExtensionRegistrar.registerExtensions();
|
VimExtensionRegistrar.registerExtensions();
|
||||||
@@ -365,14 +365,15 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
// Execute ~/.ideavimrc
|
// Execute ~/.ideavimrc
|
||||||
registerIdeavimrc();
|
registerIdeavimrc();
|
||||||
|
|
||||||
|
// Initialize extensions
|
||||||
|
VimExtensionRegistrar.enableDelayedExtensions();
|
||||||
|
|
||||||
// Turing on should be performed after all commands registration
|
// Turing on should be performed after all commands registration
|
||||||
getSearch().turnOn();
|
getSearch().turnOn();
|
||||||
VimListenerManager.INSTANCE.turnOn();
|
VimListenerManager.INSTANCE.turnOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void turnOffPlugin() {
|
private void turnOffPlugin() {
|
||||||
KeyHandler.getInstance().fullReset(null);
|
|
||||||
|
|
||||||
SearchGroup searchGroup = getSearchIfCreated();
|
SearchGroup searchGroup = getSearchIfCreated();
|
||||||
if (searchGroup != null) {
|
if (searchGroup != null) {
|
||||||
searchGroup.turnOff();
|
searchGroup.turnOff();
|
||||||
@@ -384,7 +385,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
|||||||
RegisterActions.unregisterActions();
|
RegisterActions.unregisterActions();
|
||||||
|
|
||||||
// Unregister ex handlers
|
// Unregister ex handlers
|
||||||
CommandParser.getInstance().unregisterHandlers();
|
CommandParser.INSTANCE.unregisterHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean stateUpdated = false;
|
private boolean stateUpdated = false;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,7 +25,9 @@ import com.intellij.openapi.project.Project
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
class VimProjectService(val project: Project) : Disposable {
|
class VimProjectService(val project: Project) : Disposable {
|
||||||
override fun dispose() {}
|
override fun dispose() {
|
||||||
|
// Nothing
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -36,4 +38,4 @@ class VimProjectService(val project: Project) : Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val Project.vimDisposable
|
val Project.vimDisposable
|
||||||
get() = VimProjectService.getInstance(this)
|
get() = VimProjectService.getInstance(this)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -61,7 +61,7 @@ class VimTypedActionHandler(origHandler: TypedActionHandler?) : TypedActionHandl
|
|||||||
try {
|
try {
|
||||||
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||||
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||||
handler.handleKey(editor, keyStroke, EditorDataContext(editor))
|
handler.handleKey(editor, keyStroke, EditorDataContext.init(editor, context))
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,15 +20,29 @@ package com.maddyhome.idea.vim.action
|
|||||||
import com.intellij.openapi.actionSystem.DataContext
|
import com.intellij.openapi.actionSystem.DataContext
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.maddyhome.idea.vim.KeyHandler
|
import com.maddyhome.idea.vim.KeyHandler
|
||||||
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
import com.maddyhome.idea.vim.command.Command
|
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.handler.VimActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
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() {
|
class ResetModeAction : VimActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
override val type: Command.Type = Command.Type.OTHER_WRITABLE
|
||||||
|
|
||||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
|
val modeBeforeReset = editor.mode
|
||||||
KeyHandler.getInstance().fullReset(editor.getTopLevelEditor())
|
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
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,13 +21,14 @@ package com.maddyhome.idea.vim.action
|
|||||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
import com.intellij.openapi.project.DumbAwareToggleAction
|
import com.intellij.openapi.project.DumbAwareToggleAction
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
|
import com.maddyhome.idea.vim.helper.MessageHelper
|
||||||
import com.maddyhome.idea.vim.ui.VimActions
|
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
|
* This class is used to handle the Vim Plugin enabled/disabled toggle. This is most likely used as a menu option
|
||||||
* but could also be used as a toolbar item.
|
* but could also be used as a toolbar item.
|
||||||
*/
|
*/
|
||||||
class VimPluginToggleAction : DumbAwareToggleAction() {
|
class VimPluginToggleAction : DumbAwareToggleAction()/*, LightEditCompatible*/ {
|
||||||
override fun isSelected(event: AnActionEvent): Boolean = VimPlugin.isEnabled()
|
override fun isSelected(event: AnActionEvent): Boolean = VimPlugin.isEnabled()
|
||||||
|
|
||||||
override fun setSelected(event: AnActionEvent, b: Boolean) {
|
override fun setSelected(event: AnActionEvent, b: Boolean) {
|
||||||
@@ -38,7 +39,7 @@ class VimPluginToggleAction : DumbAwareToggleAction() {
|
|||||||
super.update(e)
|
super.update(e)
|
||||||
|
|
||||||
e.presentation.text = if (VimActions.actionPlace == e.place) {
|
e.presentation.text = if (VimActions.actionPlace == e.place) {
|
||||||
if (VimPlugin.isEnabled()) "Enabled" else "Enable"
|
if (VimPlugin.isEnabled()) MessageHelper.message("action.VimPluginToggle.enabled") else MessageHelper.message("action.VimPluginToggle.enable")
|
||||||
} else "Vim Emulator"
|
} else MessageHelper.message("action.VimPluginToggle.text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -39,7 +39,9 @@ import com.maddyhome.idea.vim.helper.inInsertMode
|
|||||||
import com.maddyhome.idea.vim.helper.inNormalMode
|
import com.maddyhome.idea.vim.helper.inNormalMode
|
||||||
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||||
import com.maddyhome.idea.vim.helper.isPrimaryEditor
|
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.key.ShortcutOwner
|
||||||
|
import com.maddyhome.idea.vim.listener.IdeaSpecifics.AppCodeTemplates.appCodeTemplateCaptured
|
||||||
import com.maddyhome.idea.vim.listener.IdeaSpecifics.aceJumpActive
|
import com.maddyhome.idea.vim.listener.IdeaSpecifics.aceJumpActive
|
||||||
import com.maddyhome.idea.vim.option.OptionsManager
|
import com.maddyhome.idea.vim.option.OptionsManager
|
||||||
import java.awt.event.InputEvent
|
import java.awt.event.InputEvent
|
||||||
@@ -52,7 +54,7 @@ import javax.swing.KeyStroke
|
|||||||
*
|
*
|
||||||
* These keys are not passed to [com.maddyhome.idea.vim.VimTypedActionHandler] and should be handled by actions.
|
* These keys are not passed to [com.maddyhome.idea.vim.VimTypedActionHandler] and should be handled by actions.
|
||||||
*/
|
*/
|
||||||
class VimShortcutKeyAction : AnAction(), DumbAware {
|
class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
|
||||||
override fun actionPerformed(e: AnActionEvent) {
|
override fun actionPerformed(e: AnActionEvent) {
|
||||||
val editor = getEditor(e)
|
val editor = getEditor(e)
|
||||||
val keyStroke = getKeyStroke(e)
|
val keyStroke = getKeyStroke(e)
|
||||||
@@ -63,7 +65,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
}
|
}
|
||||||
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||||
try {
|
try {
|
||||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor))
|
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext.init(editor, e.dataContext))
|
||||||
} catch (ignored: ProcessCanceledException) {
|
} catch (ignored: ProcessCanceledException) {
|
||||||
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
||||||
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
||||||
@@ -84,7 +86,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
if (editor != null && keyStroke != null) {
|
if (editor != null && keyStroke != null) {
|
||||||
if (editor.isIdeaVimDisabledHere) return false
|
if (editor.isIdeaVimDisabledHere) return false
|
||||||
// Workaround for smart step into
|
// Workaround for smart step into
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION", "LocalVariableName", "VariableNaming")
|
||||||
val SMART_STEP_INPLACE_DATA = Key.findKeyByName("SMART_STEP_INPLACE_DATA")
|
val SMART_STEP_INPLACE_DATA = Key.findKeyByName("SMART_STEP_INPLACE_DATA")
|
||||||
if (SMART_STEP_INPLACE_DATA != null && editor.getUserData(SMART_STEP_INPLACE_DATA) != null) return false
|
if (SMART_STEP_INPLACE_DATA != null && editor.getUserData(SMART_STEP_INPLACE_DATA) != null) return false
|
||||||
|
|
||||||
@@ -96,6 +98,14 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
|
|
||||||
if (keyCode == KeyEvent.VK_ESCAPE) return isEnabledForEscape(editor)
|
if (keyCode == KeyEvent.VK_ESCAPE) return isEnabledForEscape(editor)
|
||||||
|
|
||||||
|
if (keyCode == KeyEvent.VK_TAB && editor.isTemplateActive()) return false
|
||||||
|
|
||||||
|
if ((keyCode == KeyEvent.VK_TAB || keyCode == KeyEvent.VK_ENTER) && editor.appCodeTemplateCaptured()) return false
|
||||||
|
|
||||||
|
if (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_RIGHT) return false
|
||||||
|
if (keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN) return false
|
||||||
|
if (keyCode == KeyEvent.VK_HOME || keyCode == KeyEvent.VK_END) return false
|
||||||
|
|
||||||
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
||||||
if (keyCode == KeyEvent.VK_TAB) {
|
if (keyCode == KeyEvent.VK_TAB) {
|
||||||
VimPlugin.getChange().tabAction = true
|
VimPlugin.getChange().tabAction = true
|
||||||
@@ -125,7 +135,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
private fun isEnabledForEscape(editor: Editor): Boolean {
|
private fun isEnabledForEscape(editor: Editor): Boolean {
|
||||||
return editor.isPrimaryEditor()
|
return editor.isPrimaryEditor()
|
||||||
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||||
|| OptionsManager.dialogescape.value == "on" && !editor.inNormalMode
|
|| OptionsManager.ideavimsupport.contains("dialog") && !editor.inNormalMode
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
||||||
@@ -183,16 +193,67 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmField
|
@JvmField
|
||||||
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> =
|
||||||
.addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK))
|
ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0))
|
||||||
.addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK))
|
.addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
||||||
.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_TAB, 0))
|
||||||
.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_BACK_SPACE, 0, InputEvent.CTRL_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_INSERT, 0))
|
||||||
.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_DELETE, 0, InputEvent.CTRL_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_UP, 0, InputEvent.CTRL_DOWN_MASK, 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_DOWN, 0, InputEvent.CTRL_DOWN_MASK, 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()
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_LEFT,
|
||||||
|
0,
|
||||||
|
InputEvent.CTRL_DOWN_MASK,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_RIGHT,
|
||||||
|
0,
|
||||||
|
InputEvent.CTRL_DOWN_MASK,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_HOME,
|
||||||
|
0,
|
||||||
|
InputEvent.CTRL_DOWN_MASK,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_END,
|
||||||
|
0,
|
||||||
|
InputEvent.CTRL_DOWN_MASK,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_PAGE_UP,
|
||||||
|
0,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.addAll(
|
||||||
|
getKeyStrokes(
|
||||||
|
KeyEvent.VK_PAGE_DOWN,
|
||||||
|
0,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||||
|
)
|
||||||
|
).build()
|
||||||
|
|
||||||
private const val ACTION_ID = "VimShortcutKeyAction"
|
private const val ACTION_ID = "VimShortcutKeyAction"
|
||||||
|
|
||||||
@@ -211,6 +272,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
EmptyAction.wrap(ActionManager.getInstance().getAction(ACTION_ID))
|
EmptyAction.wrap(ActionManager.getInstance().getAction(ACTION_ID))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getKeyStrokes(keyCode: Int, vararg modifiers: Int) = modifiers.map { KeyStroke.getKeyStroke(keyCode, it) }
|
private fun getKeyStrokes(keyCode: Int, vararg modifiers: Int) =
|
||||||
|
modifiers.map { KeyStroke.getKeyStroke(keyCode, it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -36,11 +36,13 @@ class AutoIndentLinesVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
VimPlugin.getChange().autoIndentRange(editor, caret, context, range.toVimTextRange(true))
|
VimPlugin.getChange().autoIndentRange(editor, caret, context, range.toVimTextRange(true))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,12 +34,14 @@ class ChangeCaseLowerMotionAction : ChangeEditorActionHandler.ForEachCaret(), Du
|
|||||||
|
|
||||||
override val duplicateWith: Char = 'u'
|
override val duplicateWith: Char = 'u'
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return argument != null &&
|
return argument != null &&
|
||||||
VimPlugin.getChange()
|
VimPlugin.getChange()
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_LOWER, argument)
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_LOWER, argument)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -38,11 +38,13 @@ class ChangeCaseLowerVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
val topLevelEditor = editor.getTopLevelEditor()
|
val topLevelEditor = editor.getTopLevelEditor()
|
||||||
return VimPlugin.getChange()
|
return VimPlugin.getChange()
|
||||||
.changeCaseRange(topLevelEditor, caret, range.toVimTextRange(false), CharacterHelper.CASE_LOWER)
|
.changeCaseRange(topLevelEditor, caret, range.toVimTextRange(false), CharacterHelper.CASE_LOWER)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,12 +28,14 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
class ChangeCaseToggleCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
class ChangeCaseToggleCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange().changeCaseToggleCharacter(editor, caret, count)
|
return VimPlugin.getChange().changeCaseToggleCharacter(editor, caret, count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,12 +34,14 @@ class ChangeCaseToggleMotionAction : ChangeEditorActionHandler.ForEachCaret(), D
|
|||||||
|
|
||||||
override val duplicateWith: Char = '~'
|
override val duplicateWith: Char = '~'
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return argument != null &&
|
return argument != null &&
|
||||||
VimPlugin.getChange()
|
VimPlugin.getChange()
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_TOGGLE, argument)
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_TOGGLE, argument)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -37,11 +37,13 @@ class ChangeCaseToggleVisualAction : VisualOperatorActionHandler.ForEachCaret()
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange()
|
return VimPlugin.getChange()
|
||||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_TOGGLE)
|
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_TOGGLE)
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,12 +34,14 @@ class ChangeCaseUpperMotionAction : ChangeEditorActionHandler.ForEachCaret(), Du
|
|||||||
|
|
||||||
override val duplicateWith: Char = 'U'
|
override val duplicateWith: Char = 'U'
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return argument != null &&
|
return argument != null &&
|
||||||
VimPlugin.getChange()
|
VimPlugin.getChange()
|
||||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_UPPER, argument)
|
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_UPPER, argument)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -37,11 +37,13 @@ class ChangeCaseUpperVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange()
|
return VimPlugin.getChange()
|
||||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_UPPER)
|
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_UPPER)
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -35,12 +35,14 @@ class ChangeCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH)
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return argument != null && VimPlugin.getChange().changeCharacter(editor, caret, count, argument.character)
|
return argument != null && VimPlugin.getChange().changeCharacter(editor, caret, count, argument.character)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
|||||||
import com.maddyhome.idea.vim.command.Argument
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.command.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.handler.ChangeEditorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@@ -31,14 +33,16 @@ import java.util.*
|
|||||||
class ChangeCharactersAction : ChangeEditorActionHandler.ForEachCaret() {
|
class ChangeCharactersAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
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,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange().changeCharacters(editor, caret, count)
|
return VimPlugin.getChange().changeCharacters(editor, caret, count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
|||||||
import com.maddyhome.idea.vim.command.Argument
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.command.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.handler.ChangeEditorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@@ -31,14 +33,16 @@ import java.util.*
|
|||||||
class ChangeEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
class ChangeEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
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,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange().changeEndOfLine(editor, caret, count)
|
return VimPlugin.getChange().changeEndOfLine(editor, caret, count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,11 +29,13 @@ import com.maddyhome.idea.vim.helper.EditorHelper
|
|||||||
class ChangeLastGlobalSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
class ChangeLastGlobalSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
context: DataContext,
|
editor: Editor,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
val range = LineRange(0, EditorHelper.getLineCount(editor) - 1)
|
val range = LineRange(0, EditorHelper.getLineCount(editor) - 1)
|
||||||
return VimPlugin.getSearch()
|
return VimPlugin.getSearch()
|
||||||
.searchAndReplace(editor, editor.caretModel.primaryCaret, range, "s", "//~/&")
|
.searchAndReplace(editor, editor.caretModel.primaryCaret, range, "s", "//~/&")
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,11 +28,13 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
class ChangeLastSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
class ChangeLastSearchReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
context: DataContext,
|
editor: Editor,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
var result = true
|
var result = true
|
||||||
for (caret in editor.caretModel.allCarets) {
|
for (caret in editor.caretModel.allCarets) {
|
||||||
val line = caret.logicalPosition.line
|
val line = caret.logicalPosition.line
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,6 +25,8 @@ import com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceA
|
|||||||
import com.maddyhome.idea.vim.command.Argument
|
import com.maddyhome.idea.vim.command.Argument
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.command.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.handler.ChangeEditorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@@ -32,14 +34,16 @@ import java.util.*
|
|||||||
class ChangeLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
class ChangeLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
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,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
// `S` command is a synonym of `cc`
|
// `S` command is a synonym of `cc`
|
||||||
val motion = MotionDownLess1FirstNonSpaceAction()
|
val motion = MotionDownLess1FirstNonSpaceAction()
|
||||||
val command = Command(1, motion, motion.type, motion.flags)
|
val command = Command(1, motion, motion.type, motion.flags)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -33,12 +33,14 @@ class ChangeMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableO
|
|||||||
|
|
||||||
override val duplicateWith: Char = 'c'
|
override val duplicateWith: Char = 'c'
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return argument != null && VimPlugin.getChange().changeMotion(editor, caret, context, count, rawCount, argument)
|
return argument != null && VimPlugin.getChange().changeMotion(editor, caret, context, count, rawCount, argument)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,11 +32,13 @@ class ChangeReplaceAction : ChangeEditorActionHandler.SingleExecution() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
override fun execute(
|
||||||
context: DataContext,
|
editor: Editor,
|
||||||
count: Int,
|
context: DataContext,
|
||||||
rawCount: Int,
|
count: Int,
|
||||||
argument: Argument?): Boolean {
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
VimPlugin.getChange().changeReplace(editor, context)
|
VimPlugin.getChange().changeReplace(editor, context)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -36,11 +36,13 @@ class ChangeVisualAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange().changeRange(editor, caret, range.toVimTextRange(false), range.type, context)
|
return VimPlugin.getChange().changeRange(editor, caret, range.toVimTextRange(false), range.type, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -39,11 +39,13 @@ class ChangeVisualCharacterAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH, CommandFlags.FLAG_EXIT_VISUAL)
|
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_ALLOW_DIGRAPH, CommandFlags.FLAG_EXIT_VISUAL)
|
||||||
|
|
||||||
override fun executeAction(editor: Editor,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
val argument = cmd.argument
|
val argument = cmd.argument
|
||||||
return argument != null &&
|
return argument != null &&
|
||||||
VimPlugin.getChange().changeCharacterRange(editor, range.toVimTextRange(false), argument.character)
|
VimPlugin.getChange().changeCharacterRange(editor, range.toVimTextRange(false), argument.character)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,12 +23,16 @@ import com.intellij.openapi.editor.Editor
|
|||||||
import com.maddyhome.idea.vim.VimPlugin
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.command.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.command.SelectionType
|
||||||
import com.maddyhome.idea.vim.common.TextRange
|
import com.maddyhome.idea.vim.common.TextRange
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import com.maddyhome.idea.vim.helper.fileSize
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,16 +41,22 @@ import java.util.*
|
|||||||
class ChangeVisualLinesAction : VisualOperatorActionHandler.ForEachCaret() {
|
class ChangeVisualLinesAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
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,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
val textRange = range.toVimTextRange(true)
|
val textRange = range.toVimTextRange(true)
|
||||||
val lineRange = TextRange(EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, textRange.endOffset)
|
||||||
EditorHelper.getLineEndForOffset(editor, textRange.endOffset) + 1)
|
val endsWithNewLine = if (lineEndForOffset == editor.fileSize) 0 else 1
|
||||||
|
val lineRange = TextRange(
|
||||||
|
EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
||||||
|
lineEndForOffset + endsWithNewLine
|
||||||
|
)
|
||||||
return VimPlugin.getChange().changeRange(editor, caret, lineRange, SelectionType.LINE_WISE, context)
|
return VimPlugin.getChange().changeRange(editor, caret, lineRange, SelectionType.LINE_WISE, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,12 +23,16 @@ import com.intellij.openapi.editor.Editor
|
|||||||
import com.maddyhome.idea.vim.VimPlugin
|
import com.maddyhome.idea.vim.VimPlugin
|
||||||
import com.maddyhome.idea.vim.command.Command
|
import com.maddyhome.idea.vim.command.Command
|
||||||
import com.maddyhome.idea.vim.command.CommandFlags
|
import com.maddyhome.idea.vim.command.CommandFlags
|
||||||
|
import com.maddyhome.idea.vim.command.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.command.SelectionType
|
||||||
import com.maddyhome.idea.vim.common.TextRange
|
import com.maddyhome.idea.vim.common.TextRange
|
||||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||||
|
import com.maddyhome.idea.vim.helper.fileSize
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,13 +41,15 @@ import java.util.*
|
|||||||
class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
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,
|
override fun executeAction(
|
||||||
caret: Caret,
|
editor: Editor,
|
||||||
context: DataContext,
|
caret: Caret,
|
||||||
cmd: Command,
|
context: DataContext,
|
||||||
range: VimSelection): Boolean {
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
val vimTextRange = range.toVimTextRange(true)
|
val vimTextRange = range.toVimTextRange(true)
|
||||||
return if (range.type == SelectionType.BLOCK_WISE && vimTextRange.isMultiple) {
|
return if (range.type == SelectionType.BLOCK_WISE && vimTextRange.isMultiple) {
|
||||||
val starts = vimTextRange.startOffsets
|
val starts = vimTextRange.startOffsets
|
||||||
@@ -56,8 +62,12 @@ class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
val blockRange = TextRange(starts, ends)
|
val blockRange = TextRange(starts, ends)
|
||||||
VimPlugin.getChange().changeRange(editor, caret, blockRange, SelectionType.BLOCK_WISE, context)
|
VimPlugin.getChange().changeRange(editor, caret, blockRange, SelectionType.BLOCK_WISE, context)
|
||||||
} else {
|
} else {
|
||||||
val lineRange = TextRange(EditorHelper.getLineStartForOffset(editor, vimTextRange.startOffset),
|
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset)
|
||||||
EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset) + 1)
|
val endsWithNewLine = if (lineEndForOffset == editor.fileSize) 0 else 1
|
||||||
|
val lineRange = TextRange(
|
||||||
|
EditorHelper.getLineStartForOffset(editor, vimTextRange.startOffset),
|
||||||
|
lineEndForOffset + endsWithNewLine
|
||||||
|
)
|
||||||
VimPlugin.getChange().changeRange(editor, caret, lineRange, SelectionType.LINE_WISE, context)
|
VimPlugin.getChange().changeRange(editor, caret, lineRange, SelectionType.LINE_WISE, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
* Copyright (C) 2003-2021 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -40,8 +40,10 @@ class FilterMotionAction : VimActionHandler.SingleExecution(), DuplicableOperato
|
|||||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||||
val argument = cmd.argument ?: return false
|
val argument = cmd.argument ?: return false
|
||||||
val range = MotionGroup
|
val range = MotionGroup
|
||||||
.getMotionRange(editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount,
|
.getMotionRange(
|
||||||
argument)
|
editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount,
|
||||||
|
argument
|
||||||
|
)
|
||||||
?: return false
|
?: return false
|
||||||
|
|
||||||
val current = editor.caretModel.logicalPosition
|
val current = editor.caretModel.logicalPosition
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user