mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 07:31:47 +02:00
Compare commits
164 Commits
0.61.1-EAP
...
0.64.1-EAP
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 |
@@ -5,17 +5,27 @@
|
|||||||
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
||||||
</ManuallySuppressedIssues>
|
</ManuallySuppressedIssues>
|
||||||
<CurrentIssues>
|
<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: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: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: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: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: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: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: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>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: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: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: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:ActionListHandler.kt$ActionListHandler$50</ID>
|
||||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
||||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
||||||
@@ -33,9 +43,10 @@
|
|||||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
||||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
||||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$999999999</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$6</ID>
|
||||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
||||||
<ID>MagicNumber:EditorHelper.kt$10</ID>
|
|
||||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
||||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
||||||
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
||||||
@@ -50,6 +61,7 @@
|
|||||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
||||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
||||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
||||||
|
<ID>MagicNumber:OptionsManager.kt$OptionsManager$50</ID>
|
||||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
||||||
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
||||||
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
||||||
@@ -61,85 +73,28 @@
|
|||||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
||||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
||||||
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
||||||
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger<ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: $pluginId")</ID>
|
<ID>MaxLineLength: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:ExRanges.kt$SearchRange$override</ID>
|
|
||||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set clipboard+=ideaput", "ideaput") { OptionsManager.clipboard.append(ClipboardOptionsData.ideaput) })</ID>
|
<ID>MaxLineLength:NotificationService.kt$NotificationService$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$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: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:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
|
||||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$private</ID>
|
|
||||||
<ID>MaxLineLength:PutLinesHandler.kt$PutLinesHandler$val textData = registerGroup.lastRegister?.let { PutData.TextData(it.text ?: StringHelper.toKeyNotation(it.keys), SelectionType.LINE_WISE, it.transferableData) }</ID>
|
|
||||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBaseAction$val textData = if (lastRegister != null) TextData(lastRegister.text ?: StringHelper.toKeyNotation(lastRegister.keys), lastRegister.type, lastRegister.transferableData) else null</ID>
|
|
||||||
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Operator$val visualSelection = PutData.VisualSelection(mapOf(editor.caretModel.primaryCaret to VimSelection.create(range.startOffset, range.endOffset - 1, selectionType, editor)), selectionType)</ID>
|
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Operator$val visualSelection = PutData.VisualSelection(mapOf(editor.caretModel.primaryCaret to VimSelection.create(range.startOffset, range.endOffset - 1, selectionType, editor)), selectionType)</ID>
|
||||||
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&build=$buildNumber&pluginVersion=$version&os=$os&uuid=$uid"</ID>
|
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&build=$buildNumber&pluginVersion=$version&os=$os&uuid=$uid"</ID>
|
||||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$@JvmField val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_END, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_UP, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_DOWN, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)).build()</ID>
|
|
||||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))</ID>
|
|
||||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
|
||||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
|
||||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
|
||||||
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList<Range> = mutableListOf()</ID>
|
<ID>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>NestedBlockDepth:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||||
<ID>ReturnCount:ActionBeanClass.kt$ActionBeanClass$fun getParsedModes(): Set<MappingMode>?</ID>
|
|
||||||
<ID>ReturnCount:Alias.kt$Alias$fun getCommand(input: String, count: Int): String</ID>
|
|
||||||
<ID>ReturnCount:CmdFilterHandler.kt$CmdFilterHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||||
<ID>ReturnCount:CommandGroup.kt$CommandGroup$fun isAlias(command: String): Boolean</ID>
|
|
||||||
<ID>ReturnCount:DeleteJoinLinesAction.kt$DeleteJoinLinesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
|
||||||
<ID>ReturnCount:DeleteJoinLinesSpacesAction.kt$DeleteJoinLinesSpacesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
|
||||||
<ID>ReturnCount:DeleteJoinVisualLinesAction.kt$DeleteJoinVisualLinesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
|
||||||
<ID>ReturnCount:DeleteJoinVisualLinesSpacesAction.kt$DeleteJoinVisualLinesSpacesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
|
||||||
<ID>ReturnCount:DeleteMotionAction.kt$DeleteMotionAction$override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
|
||||||
<ID>ReturnCount:EditFileHandler.kt$EditFileHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:EditorHelper.kt$ fun Editor.isPrimaryEditor(): Boolean</ID>
|
|
||||||
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</ID>
|
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</ID>
|
||||||
<ID>ReturnCount:FilterMotionAction.kt$FilterMotionAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
|
||||||
<ID>ReturnCount:GotoCharacterHandler.kt$GotoCharacterHandler$override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:Helper.kt$@Suppress("IncorrectParentDisposable") fun Editor.isTemplateActive(): Boolean</ID>
|
|
||||||
<ID>ReturnCount:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:IdeaSelectionControl.kt$IdeaSelectionControl$ fun predictMode(editor: Editor, selectionSource: VimListenerManager.SelectionSource): CommandState.Mode</ID>
|
|
||||||
<ID>ReturnCount:MapHandler.kt$MapHandler$@Throws(ExException::class) private fun executeCommand(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
|
||||||
<ID>ReturnCount:Marks.kt$IntellijMark$private fun getProject(): Project?</ID>
|
|
||||||
<ID>ReturnCount:Marks.kt$VimMark.Companion$@JvmStatic fun create(key: Char?, logicalLine: Int?, col: Int?, filename: String?, protocol: String?): VimMark?</ID>
|
|
||||||
<ID>ReturnCount:ModalEntry.kt$ModalEntry.<no name provided>$override fun dispatchKeyEvent(e: KeyEvent): Boolean</ID>
|
|
||||||
<ID>ReturnCount:MotionScrollLastScreenLinePageStartAction.kt$MotionScrollLastScreenLinePageStartAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
|
||||||
<ID>ReturnCount:OperatorAction.kt$OperatorAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
|
||||||
<ID>ReturnCount:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
|
||||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun getProviderForPasteViaIde(context: DataContext, typeInRegister: SelectionType, data: PutData): PasteProvider?</ID>
|
|
||||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
|
||||||
<ID>ReturnCount:PutLinesHandler.kt$PutLinesHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:ReloadVimRc.kt$VimRcFileState$fun equalTo(document: Document): Boolean</ID>
|
|
||||||
<ID>ReturnCount:RepeatHandler.kt$RepeatHandler$@Throws(ExException::class) override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
|
||||||
<ID>ReturnCount:SelectMotionRightAction.kt$SelectMotionRightAction$override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int</ID>
|
|
||||||
<ID>ReturnCount:ShowCmd.kt$ShowCmd$fun getFullText(editor: Editor?): String</ID>
|
|
||||||
<ID>ReturnCount:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
|
||||||
<ID>ReturnCount:TextObjectActionHandler.kt$TextObjectActionHandler$ final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
|
||||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun redo(context: DataContext): Boolean</ID>
|
|
||||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun undo(context: DataContext): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VimExchangeExtension.kt$VimExchangeExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic fun inputString(editor: Editor, prompt: String, finishOn: Char?): String</ID>
|
|
||||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.SkipOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
|
||||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$@Throws(ExException::class) fun evaluate(expression: String, globals: Map<String?, Any?>): Any</ID>
|
|
||||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$fun findOrCreateIdeaVimRc(): File?</ID>
|
|
||||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun getKeyStroke(e: AnActionEvent): KeyStroke?</ID>
|
|
||||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler$override fun execute(editor: Editor, context: DataContext)</ID>
|
|
||||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualBlockAppendAction.kt$VisualBlockAppendAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualBlockInsertAction.kt$VisualBlockInsertAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$ fun toggleVisual(editor: Editor, count: Int, rawCount: Int, subMode: CommandState.SubMode): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun autodetectVisualSubmode(editor: Editor): CommandState.SubMode</ID>
|
|
||||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun selectPreviousVisualMode(editor: Editor): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun swapVisualSelections(editor: Editor): Boolean</ID>
|
|
||||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
||||||
<ID>ReturnCount:VisualOperatorActionHandler.kt$VisualOperatorActionHandler$final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
|
||||||
<ID>ReturnCount:YankGroup.kt$YankGroup$ fun yankMotion(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument): Boolean</ID>
|
|
||||||
<ID>ThrowsCount:CommandHandler.kt$CommandHandler$private fun checkArgs(cmd: ExCommand)</ID>
|
<ID>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:CommandBuilder.kt$CommandBuilder</ID>
|
||||||
<ID>TooManyFunctions:CommandState.kt$CommandState</ID>
|
<ID>TooManyFunctions:CommandState.kt$CommandState</ID>
|
||||||
<ID>TooManyFunctions:PutGroup.kt$PutGroup</ID>
|
<ID>TooManyFunctions:PutGroup.kt$PutGroup</ID>
|
||||||
<ID>TooManyFunctions:Ranges.kt$Ranges</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:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
|
||||||
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
||||||
</CurrentIssues>
|
</CurrentIssues>
|
||||||
|
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"
|
3
.idea/inspectionProfiles/Project_Default.xml
generated
3
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +1,7 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
<component name="InspectionProjectProfileManager">
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<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">
|
<inspection_tool class="HardCodedStringLiteral" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<scope name="Production" level="WARNING" enabled="false">
|
<scope name="Production" level="WARNING" enabled="false">
|
||||||
<option name="ignoreForAssertStatements" value="true" />
|
<option name="ignoreForAssertStatements" value="true" />
|
||||||
@@ -28,8 +29,8 @@
|
|||||||
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<option name="m_requireAnnotationsFirst" value="true" />
|
<option name="m_requireAnnotationsFirst" value="true" />
|
||||||
</inspection_tool>
|
</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="PluginXmlI18n" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
2
.idea/inspectionProfiles/Qodana.xml
generated
2
.idea/inspectionProfiles/Qodana.xml
generated
@@ -2,6 +2,7 @@
|
|||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<description>Inspections profile for Qodana</description>
|
<description>Inspections profile for Qodana</description>
|
||||||
<option name="myName" value="Qodana" />
|
<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">
|
<inspection_tool class="CanBeFinal" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<option name="REPORT_CLASSES" value="false" />
|
<option name="REPORT_CLASSES" value="false" />
|
||||||
<option name="REPORT_METHODS" value="false" />
|
<option name="REPORT_METHODS" value="false" />
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
<option name="processLiterals" value="true" />
|
<option name="processLiterals" value="true" />
|
||||||
<option name="processComments" value="true" />
|
<option name="processComments" value="true" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
<inspection_tool class="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
</profile>
|
</profile>
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="IdeaVim full verification" type="GradleRunConfiguration" factoryName="Gradle">
|
<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>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
1
.idea/runConfigurations/IdeaVim_tests.xml
generated
1
.idea/runConfigurations/IdeaVim_tests.xml
generated
@@ -1,5 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="IdeaVim tests" type="GradleRunConfiguration" factoryName="Gradle">
|
<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>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Start IJ with IdeaVim" type="GradleRunConfiguration" factoryName="Gradle">
|
<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>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
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"
|
||||||
|
}
|
91
.teamcity/_Self/Project.kt
vendored
91
.teamcity/_Self/Project.kt
vendored
@@ -3,84 +3,87 @@ package _Self
|
|||||||
import _Self.buildTypes.GitHubPullRequests
|
import _Self.buildTypes.GitHubPullRequests
|
||||||
import _Self.buildTypes.Nvim
|
import _Self.buildTypes.Nvim
|
||||||
import _Self.buildTypes.PluginVerifier
|
import _Self.buildTypes.PluginVerifier
|
||||||
import _Self.buildTypes.Release
|
import _Self.buildTypes.PropertyBased
|
||||||
import _Self.buildTypes.ReleaseEap
|
import _Self.buildTypes.Qodana
|
||||||
import _Self.buildTypes.TestsForIntelliJ20181
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20182
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20183
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20191
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20192
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20193
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20201
|
|
||||||
import _Self.buildTypes.TestsForIntelliJ20202
|
import _Self.buildTypes.TestsForIntelliJ20202
|
||||||
|
import _Self.buildTypes.TestsForIntelliJ20203
|
||||||
import _Self.buildTypes.TestsForIntelliJEAP
|
import _Self.buildTypes.TestsForIntelliJEAP
|
||||||
|
import _Self.subprojects.OldTests
|
||||||
|
import _Self.subprojects.Releases
|
||||||
import _Self.vcsRoots.Branch_181
|
import _Self.vcsRoots.Branch_181
|
||||||
import _Self.vcsRoots.Branch_183
|
import _Self.vcsRoots.Branch_183
|
||||||
import _Self.vcsRoots.Branch_191_193
|
import _Self.vcsRoots.Branch_191_193
|
||||||
|
import _Self.vcsRoots.Branch_201
|
||||||
import _Self.vcsRoots.GitHubPullRequest
|
import _Self.vcsRoots.GitHubPullRequest
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||||
|
|
||||||
object Project : Project({
|
object Project : Project({
|
||||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||||
|
|
||||||
|
subProjects(Releases, OldTests)
|
||||||
|
|
||||||
|
// VCS roots
|
||||||
vcsRoot(Branch_183)
|
vcsRoot(Branch_183)
|
||||||
vcsRoot(Branch_181)
|
vcsRoot(Branch_181)
|
||||||
vcsRoot(GitHubPullRequest)
|
|
||||||
vcsRoot(Branch_191_193)
|
vcsRoot(Branch_191_193)
|
||||||
|
vcsRoot(Branch_201)
|
||||||
|
vcsRoot(GitHubPullRequest)
|
||||||
|
|
||||||
|
// Builds
|
||||||
buildType(GitHubPullRequests)
|
buildType(GitHubPullRequests)
|
||||||
buildType(Release)
|
|
||||||
buildType(TestsForIntelliJ20201)
|
|
||||||
buildType(TestsForIntelliJ20191)
|
|
||||||
buildType(TestsForIntelliJ20181)
|
|
||||||
buildType(TestsForIntelliJ20192)
|
|
||||||
buildType(TestsForIntelliJ20182)
|
|
||||||
buildType(TestsForIntelliJ20193)
|
|
||||||
buildType(TestsForIntelliJ20183)
|
|
||||||
buildType(Nvim)
|
|
||||||
buildType(ReleaseEap)
|
|
||||||
buildType(TestsForIntelliJ20202)
|
buildType(TestsForIntelliJ20202)
|
||||||
|
buildType(TestsForIntelliJ20203)
|
||||||
buildType(TestsForIntelliJEAP)
|
buildType(TestsForIntelliJEAP)
|
||||||
|
|
||||||
|
buildType(PropertyBased)
|
||||||
|
|
||||||
|
buildType(Nvim)
|
||||||
buildType(PluginVerifier)
|
buildType(PluginVerifier)
|
||||||
|
|
||||||
|
buildType(Qodana)
|
||||||
|
|
||||||
|
// Unknown staff generated by TeamCity
|
||||||
features {
|
features {
|
||||||
feature {
|
feature {
|
||||||
id = "PROJECT_EXT_768"
|
|
||||||
type = "CloudImage"
|
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("use-spot-instances", "true")
|
||||||
param("user-tags", "project=idea-vim")
|
param("user-tags", "project=idea-vim")
|
||||||
param("agent_pool_id", "41")
|
param("instance-type", "c5d.xlarge")
|
||||||
param("image-instances-limit", "")
|
param("spot-instance-price", "0.12")
|
||||||
param("subnet-id", "subnet-58839511")
|
|
||||||
param("ebs-optimized", "false")
|
|
||||||
param("instance-type", "c5d.large")
|
|
||||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
|
||||||
param("spot-instance-price", "0.1")
|
|
||||||
param("source-id", "BuildAgentsIdeaVim")
|
|
||||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
|
||||||
param("key-pair-name", "teamcity-prod-pub")
|
|
||||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
|
||||||
param("profileId", "amazon-48")
|
|
||||||
}
|
}
|
||||||
feature {
|
feature {
|
||||||
id = "amazon-48"
|
|
||||||
type = "CloudProfile"
|
type = "CloudProfile"
|
||||||
param("profileServerUrl", "")
|
id = "amazon-48"
|
||||||
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
param("agentPushPreset", "")
|
||||||
param("system.cloud.profile_id", "amazon-48")
|
|
||||||
param("total-work-time", "")
|
|
||||||
param("description", "")
|
|
||||||
param("cloud-code", "amazon")
|
param("cloud-code", "amazon")
|
||||||
|
param("description", "")
|
||||||
param("enabled", "true")
|
param("enabled", "true")
|
||||||
param("max-running-instances", "10")
|
param("max-running-instances", "10")
|
||||||
param("agentPushPreset", "")
|
|
||||||
param("profileId", "amazon-48")
|
|
||||||
param("name", "Cloud Agents")
|
param("name", "Cloud Agents")
|
||||||
param("next-hour", "")
|
param("next-hour", "")
|
||||||
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
|
||||||
param("region", "eu-west-1")
|
|
||||||
param("terminate-idle-time", "15")
|
|
||||||
param("not-checked", "")
|
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", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
2
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
2
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
@@ -41,5 +41,5 @@ sealed class ActiveTests(buildName: String, ijVersion: String) : BuildType({
|
|||||||
})
|
})
|
||||||
|
|
||||||
object TestsForIntelliJEAP : ActiveTests("Tests for IntelliJ Latest EAP", "LATEST-EAP-SNAPSHOT")
|
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")
|
object TestsForIntelliJ20202 : ActiveTests("Tests for IntelliJ 2020.2", "2020.2")
|
||||||
object TestsForIntelliJ20201 : ActiveTests("Tests for IntelliJ 2020.1", "2020.1")
|
|
||||||
|
@@ -16,7 +16,7 @@ object GitHubPullRequests : BuildType({
|
|||||||
|
|
||||||
params {
|
params {
|
||||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.3")
|
||||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
})
|
12
.teamcity/_Self/buildTypes/Release.kt
vendored
12
.teamcity/_Self/buildTypes/Release.kt
vendored
@@ -1,5 +1,9 @@
|
|||||||
package _Self.buildTypes
|
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.BuildType
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||||
@@ -10,19 +14,19 @@ object Release : BuildType({
|
|||||||
description = "Build and publish IdeaVim plugin"
|
description = "Build and publish IdeaVim plugin"
|
||||||
|
|
||||||
artifactRules = "build/distributions/*"
|
artifactRules = "build/distributions/*"
|
||||||
buildNumberPattern = "0.61"
|
buildNumberPattern = VERSION
|
||||||
|
|
||||||
params {
|
params {
|
||||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||||
password(
|
password(
|
||||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
label = "Password"
|
label = "Password"
|
||||||
)
|
)
|
||||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
|
param("env.ORG_GRADLE_PROJECT_publishChannels", "$DEFAULT,$EAP,$DEV")
|
||||||
}
|
}
|
||||||
|
|
||||||
vcs {
|
vcs {
|
||||||
|
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 = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
28
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
28
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
@@ -1,5 +1,7 @@
|
|||||||
package _Self.buildTypes
|
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.BuildType
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||||
@@ -13,19 +15,19 @@ object ReleaseEap : BuildType({
|
|||||||
description = "Build and publish EAP of IdeaVim plugin"
|
description = "Build and publish EAP of IdeaVim plugin"
|
||||||
|
|
||||||
artifactRules = "build/distributions/*"
|
artifactRules = "build/distributions/*"
|
||||||
buildNumberPattern = "0.61.%build.counter%"
|
buildNumberPattern = "$VERSION.%build.counter%"
|
||||||
|
|
||||||
params {
|
params {
|
||||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||||
password(
|
password(
|
||||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||||
label = "Token"
|
label = "Password"
|
||||||
)
|
)
|
||||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
|
||||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
|
param("env.ORG_GRADLE_PROJECT_publishChannels", EAP)
|
||||||
password(
|
password(
|
||||||
"env.ORG_GRADLE_PROJECT_slackUrl",
|
"env.ORG_GRADLE_PROJECT_slackUrl",
|
||||||
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||||
@@ -48,22 +50,6 @@ object ReleaseEap : BuildType({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
triggers {
|
|
||||||
schedule {
|
|
||||||
enabled = false
|
|
||||||
schedulingPolicy = daily {
|
|
||||||
hour = 22
|
|
||||||
}
|
|
||||||
branchFilter = ""
|
|
||||||
triggerBuild = onWatchedBuildChange {
|
|
||||||
buildType = "IdeaVim_TestsForIntelliJBranch146"
|
|
||||||
watchedBuildRule = ScheduleTrigger.WatchedBuildRule.LAST_SUCCESSFUL
|
|
||||||
watchedBuildBranchFilter = "<default>"
|
|
||||||
promoteWatchedBuild = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
features {
|
features {
|
||||||
vcsLabeling {
|
vcsLabeling {
|
||||||
vcsRootId = "${DslContext.settingsRoot.id}"
|
vcsRootId = "${DslContext.settingsRoot.id}"
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
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_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
|
||||||
|
})
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
.teamcity/settings.kts
vendored
2
.teamcity/settings.kts
vendored
@@ -29,5 +29,5 @@ node (Plugins -> teamcity-configs -> teamcity-configs:generate),
|
|||||||
the 'Debug' option is available in the context menu for the task.
|
the 'Debug' option is available in the context menu for the task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
version = "2020.1"
|
version = "2020.2"
|
||||||
project(_Self.Project)
|
project(_Self.Project)
|
12
AUTHORS.md
12
AUTHORS.md
@@ -331,6 +331,18 @@ Contributors:
|
|||||||
[![icon][github]](https://github.com/antekone)
|
[![icon][github]](https://github.com/antekone)
|
||||||
|
|
||||||
Grzegorz Antoniak
|
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
|
||||||
|
|
||||||
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.
|
||||||
|
39
CHANGES.md
39
CHANGES.md
@@ -25,15 +25,51 @@ usual beta standards.
|
|||||||
## To Be Released
|
## 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-179a)
|
||||||
|
Special characters are not interpreted on yanking
|
||||||
|
|
||||||
|
## 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 `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)
|
* 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:
|
### Fixes:
|
||||||
* [VIM-2113](https://youtrack.jetbrains.com/issue/VIM-2113) Fix `cit` for empty tags
|
* [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-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-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-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:
|
### 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
|
* [249](https://github.com/JetBrains/ideavim/pull/249) by [Jan Palus](https://github.com/jpalus): VIM-2113 Increase tag range only in visual mode
|
||||||
@@ -41,6 +77,9 @@ usual beta standards.
|
|||||||
* [256](https://github.com/JetBrains/ideavim/pull/256) by [Brandon Conway](https://github.com/brandoncc): Fix typo
|
* [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
|
* [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
|
* [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
|
## 0.61, 2020-11-12
|
||||||
|
|
||||||
|
37
README.md
37
README.md
@@ -144,21 +144,38 @@ 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:
|
||||||
|
27
build.gradle
27
build.gradle
@@ -14,8 +14,8 @@ buildscript {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.intellij' version '0.6.5'
|
id 'org.jetbrains.intellij' version '0.6.5'
|
||||||
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
id 'io.gitlab.arturbosch.detekt' version '1.15.0'
|
||||||
id "org.jetbrains.changelog" version "0.6.2"
|
id "org.jetbrains.changelog" version "1.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
@@ -59,7 +59,7 @@ runIdeForUiTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runPluginVerifier {
|
runPluginVerifier {
|
||||||
ideVersions = ["IC-2020.1.4", "IC-2020.2.3"]
|
ideVersions = ["IC-2020.2.3", "IC-2020.3"]
|
||||||
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
||||||
teamCityOutputFormat = true
|
teamCityOutputFormat = true
|
||||||
}
|
}
|
||||||
@@ -75,9 +75,10 @@ dependencies {
|
|||||||
compileOnly "org.jetbrains:annotations:20.1.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
|
||||||
testImplementation("com.ensarsarajcic.neovim.java:neovim-api: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.0")
|
testImplementation("com.intellij.remoterobot:remote-robot:0.10.3")
|
||||||
testImplementation("com.intellij.remoterobot:remote-fixtures:1.1.18")
|
testImplementation("com.intellij.remoterobot:remote-fixtures:1.1.18")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +112,22 @@ tasks.detekt.jvmTarget = javaVersion
|
|||||||
task testWithNeovim(type: Test) {
|
task testWithNeovim(type: Test) {
|
||||||
group = "verification"
|
group = "verification"
|
||||||
systemProperty "ideavim.nvim.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 {
|
changelog {
|
||||||
|
@@ -22,6 +22,14 @@ Available extensions:
|
|||||||
* Install [IdeaVim-EasyMotion](https://plugins.jetbrains.com/plugin/13360-ideavim-easymotion/)
|
* Install [IdeaVim-EasyMotion](https://plugins.jetbrains.com/plugin/13360-ideavim-easymotion/)
|
||||||
and [AceJump](https://plugins.jetbrains.com/plugin/7086-acejump/) plugins.
|
and [AceJump](https://plugins.jetbrains.com/plugin/7086-acejump/) plugins.
|
||||||
* `set easymotion`
|
* `set easymotion`
|
||||||
|
* <details>
|
||||||
|
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||||
|
<code>Plug 'https://github.com/easymotion/vim-easymotion'</code>
|
||||||
|
<br/>
|
||||||
|
<code>Plug 'easymotion/vim-easymotion'</code>
|
||||||
|
<br/>
|
||||||
|
<code>Plug 'vim-easymotion'</code>
|
||||||
|
</details>
|
||||||
* Emulates [vim-easymotion](https://github.com/easymotion/vim-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).
|
* Commands: All commands with the mappings are supported. See the [full list of supported commands](https://github.com/AlexPl292/IdeaVim-EasyMotion#supported-commands).
|
||||||
|
|
||||||
|
@@ -38,6 +38,7 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
|||||||
acts like startsel is enabled
|
acts like startsel is enabled
|
||||||
|
|
||||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
'matchpairs' 'mps' pairs of characters that "%" can match
|
||||||
|
'maxmapdepth' 'mmd' Maximum depth of mappings
|
||||||
'more' 'more' When on, listings pause when the whole screen is filled.
|
'more' 'more' When on, listings pause when the whole screen is filled.
|
||||||
'nrformats' 'nf' number formats recognized for CTRL-A command
|
'nrformats' 'nf' number formats recognized for CTRL-A command
|
||||||
'number' 'nu' print the line number in front of each line
|
'number' 'nu' print the line number in front of each line
|
||||||
|
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"/>
|
||||||
|
@@ -80,5 +80,15 @@
|
|||||||
<alias name="vim-highlightedyank"/>
|
<alias name="vim-highlightedyank"/>
|
||||||
</aliases>
|
</aliases>
|
||||||
</vimExtension>
|
</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>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
@@ -4,61 +4,21 @@
|
|||||||
<change-notes><![CDATA[
|
<change-notes><![CDATA[
|
||||||
<h3>Features:</h3>
|
<h3>Features:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Support <code>unmap</code> and <code>mapclear</code> commands
|
<li>Support <code>NERDTree</code> extension <a href="https://youtrack.jetbrains.com/issue/VIM-1042">VIM-1042</a> | <a
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-1491">VIM-1491</a>
|
href="https://github.com/preservim/nerdtree">NERDTree</a></li>
|
||||||
</li>
|
<li>Support <code>maxmapdepth</code> option to define the maximum depth of mappings</li>
|
||||||
<li>Support mappings in ex panel (<code>cmap</code>)
|
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-1227">VIM-1227</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Fixes:</h3>
|
<h3>Fixes:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><a href="https://youtrack.jetbrains.com/issue/VIM-2202">VIM-2202</a> Fix macro recording for ex command and search
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-2113">VIM-2113</a>
|
</li>
|
||||||
Fix <code>cit</code> for empty tags
|
<li><a href="https://youtrack.jetbrains.com/issue/VIM-1799">VIM-1799</a>
|
||||||
</li>
|
<a href="https://youtrack.jetbrains.com/issue/VIM-179a">VIM-1794</a>
|
||||||
<li>
|
Special characters are not interpreted on yanking
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-2114">VIM-2114</a>
|
</li>
|
||||||
Unnamed register isn't changed after deleting empty tag
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-1475">VIM-1475</a>
|
|
||||||
Enable block caret to be used in insert mode.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://youtrack.jetbrains.com/issue/VIM-2170">VIM-2170</a>
|
|
||||||
Fix an alternative range format for <code>s</code> command
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
]]>
|
||||||
<h3>Merged PRs:</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/JetBrains/ideavim/pull/249">249</a>
|
|
||||||
by <a href="https://github.com/jpalus">Jan Palus</a>: VIM-2113 Increase tag range only in visual mode
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/JetBrains/ideavim/pull/250">250</a>
|
|
||||||
by <a href="https://github.com/jpalus">Jan Palus</a>: VIM-2114 Do not override registers when deleting empty range
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/JetBrains/ideavim/pull/256">256</a>
|
|
||||||
by <a href="https://github.com/brandoncc">Brandon Conway</a>: Fix typo
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/JetBrains/ideavim/pull/254">254</a>
|
|
||||||
by <a href="https://github.com/antekone">Grzegorz Antoniak</a>: VIM-1475: Add an option to use block caret in insert
|
|
||||||
mode
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/JetBrains/ideavim/pull/225">225</a>
|
|
||||||
by <a href="https://github.com/sumoooru2">sumoooru2</a>: Implement cmap
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<br/>
|
|
||||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
|
||||||
]]>
|
|
||||||
</change-notes>
|
</change-notes>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<p>Vim emulation plugin for IntelliJ Platform-based IDEs.</p>
|
<p>Vim emulation plugin for IntelliJ Platform-based IDEs.</p>
|
||||||
@@ -77,7 +37,7 @@
|
|||||||
|
|
||||||
<!-- 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.41"/>
|
<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>
|
||||||
@@ -111,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,
|
||||||
|
@@ -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
|
||||||
@@ -113,7 +113,7 @@ could.not.find.file.0=Could not find file: {0}
|
|||||||
popup.advertisement.version=Version {0}
|
popup.advertisement.version=Version {0}
|
||||||
action.eap.choice.active.text=EAP{0, choice, 0# (Active)|1#}
|
action.eap.choice.active.text=EAP{0, choice, 0# (Active)|1#}
|
||||||
action.about.eap.text=About EAP...
|
action.about.eap.text=About EAP...
|
||||||
action.contacts.help.text=Contacts && Help
|
action.contacts.help.text=Contacts \\&\\& Help
|
||||||
action.contact.on.twitter.text=Contact on Twitter
|
action.contact.on.twitter.text=Contact on Twitter
|
||||||
action.create.issue.text=Create an Issue
|
action.create.issue.text=Create an Issue
|
||||||
action.contribute.on.github.text=Contribute on GitHub
|
action.contribute.on.github.text=Contribute on GitHub
|
||||||
@@ -123,3 +123,4 @@ action.subscribe.to.eap.text=Subscribe to EAP
|
|||||||
configurable.name.vim.emulation=Vim Emulation
|
configurable.name.vim.emulation=Vim Emulation
|
||||||
border.title.shortcut.conflicts.for.active.keymap=Shortcut Conflicts for Active Keymap
|
border.title.shortcut.conflicts.for.active.keymap=Shortcut Conflicts for Active Keymap
|
||||||
message.no.more.matches=No more matches
|
message.no.more.matches=No more matches
|
||||||
|
E223=E223: recursive mapping
|
||||||
|
@@ -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
|
||||||
@@ -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
|
||||||
@@ -41,12 +41,13 @@ import com.maddyhome.idea.vim.command.*;
|
|||||||
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.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.option.OptionsManager;
|
import com.maddyhome.idea.vim.option.OptionsManager;
|
||||||
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
|
|
||||||
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;
|
||||||
@@ -162,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,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
|
||||||
@@ -207,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)) {
|
||||||
@@ -229,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);
|
||||||
@@ -288,7 +304,7 @@ 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('_'));
|
||||||
}
|
}
|
||||||
@@ -319,12 +335,13 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset(editor);
|
reset(editor);
|
||||||
ChangeGroup.resetCaret(editor, VimPlugin.getEditor().isBarCursor());
|
ChangeGroup.resetCaret(editor, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
@@ -346,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,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.
|
||||||
@@ -375,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, null), false);
|
handleKey(editor, keyStroke, EditorDataContext.init(editor, null), true, true);
|
||||||
}
|
}
|
||||||
}, ModalityState.stateForComponent(editor.getComponent())));
|
}, ModalityState.stateForComponent(editor.getComponent())));
|
||||||
}
|
}
|
||||||
@@ -397,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) {
|
||||||
@@ -430,13 +447,13 @@ public class KeyHandler {
|
|||||||
|
|
||||||
mappingState.resetMappingSequence();
|
mappingState.resetMappingSequence();
|
||||||
|
|
||||||
final EditorDataContext currentContext = new EditorDataContext(editor, context);
|
final EditorDataContext currentContext = EditorDataContext.init(editor, context);
|
||||||
|
|
||||||
mappingInfo.execute(editor, context);
|
mappingInfo.execute(editor, context);
|
||||||
|
|
||||||
// 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;
|
||||||
@@ -464,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.
|
||||||
@@ -689,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();
|
||||||
|
|
||||||
@@ -738,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,
|
||||||
@@ -818,7 +838,7 @@ public class KeyHandler {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -934,6 +954,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editorState.getCommandBuilder().isDone()) {
|
if (editorState.getCommandBuilder().isDone()) {
|
||||||
|
@@ -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
|
||||||
|
|
||||||
|
@@ -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.ex.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";
|
||||||
}
|
}
|
||||||
@@ -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,6 +365,9 @@ 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();
|
||||||
@@ -384,7 +387,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
|
||||||
|
@@ -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, context))
|
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
|
||||||
|
@@ -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,7 +28,7 @@ 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) {
|
||||||
|
@@ -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
|
||||||
@@ -41,6 +41,7 @@ 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.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
|
||||||
@@ -53,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)
|
||||||
@@ -64,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, e.dataContext))
|
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}
|
||||||
@@ -99,6 +100,8 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
|||||||
|
|
||||||
if (keyCode == KeyEvent.VK_TAB && editor.isTemplateActive()) return false
|
if (keyCode == KeyEvent.VK_TAB && editor.isTemplateActive()) return false
|
||||||
|
|
||||||
|
if ((keyCode == KeyEvent.VK_TAB || keyCode == KeyEvent.VK_ENTER) && editor.appCodeTemplateCaptured()) 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
|
||||||
@@ -186,16 +189,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"
|
||||||
|
|
||||||
@@ -214,6 +268,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
|
||||||
|
@@ -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 ChangeEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, 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
|
||||||
|
@@ -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
|
||||||
@@ -32,6 +32,7 @@ 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.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,14 +43,20 @@ class ChangeVisualLinesAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, 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
|
||||||
@@ -32,6 +32,7 @@ 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.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,11 +43,13 @@ class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
|
|
||||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, 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
|
||||||
@@ -59,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
|
||||||
|
@@ -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
|
||||||
@@ -33,12 +33,14 @@ class ReformatCodeMotionAction : ChangeEditorActionHandler.ForEachCaret(), Dupli
|
|||||||
|
|
||||||
override val duplicateWith: Char = 'q'
|
override val duplicateWith: Char = 'q'
|
||||||
|
|
||||||
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().reformatCodeMotion(editor, caret, context, count, rawCount, argument)
|
VimPlugin.getChange().reformatCodeMotion(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
|
||||||
@@ -36,11 +36,13 @@ class ReformatCodeVisualAction : 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().reformatCodeSelection(editor, caret, range)
|
VimPlugin.getChange().reformatCodeSelection(editor, caret, range)
|
||||||
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
|
||||||
@@ -28,7 +28,14 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
sealed class IncAction(val inc: Int) : ChangeEditorActionHandler.ForEachCaret() {
|
sealed class IncAction(val inc: Int) : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.CHANGE
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
|
|
||||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean {
|
override fun execute(
|
||||||
|
editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
count: Int,
|
||||||
|
rawCount: Int,
|
||||||
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
return VimPlugin.getChange().changeNumber(editor, caret, inc * count)
|
return VimPlugin.getChange().changeNumber(editor, caret, inc * 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
|
||||||
@@ -32,8 +32,15 @@ sealed class IncNumber(val inc: Int, private val avalanche: Boolean) : VisualOpe
|
|||||||
override val type: Command.Type = Command.Type.CHANGE
|
override val type: Command.Type = Command.Type.CHANGE
|
||||||
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, caret: Caret, context: DataContext, cmd: Command, range: VimSelection): Boolean {
|
override fun executeAction(
|
||||||
return VimPlugin.getChange().changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)
|
editor: Editor,
|
||||||
|
caret: Caret,
|
||||||
|
context: DataContext,
|
||||||
|
cmd: Command,
|
||||||
|
range: VimSelection
|
||||||
|
): Boolean {
|
||||||
|
return VimPlugin.getChange()
|
||||||
|
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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,15 +25,21 @@ 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.handler.ChangeEditorActionHandler
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||||
|
|
||||||
class DeleteCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
class DeleteCharacterAction : DeleteCharacter({ 1 })
|
||||||
|
class DeleteCharacterLeftAction : DeleteCharacter({ -it })
|
||||||
|
class DeleteCharacterRightAction : DeleteCharacter({ it })
|
||||||
|
|
||||||
|
abstract class DeleteCharacter(private val countModifier: (Int) -> Int) : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
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,
|
||||||
return VimPlugin.getChange().deleteCharacter(editor, caret, 1, false)
|
argument: Argument?
|
||||||
|
): Boolean {
|
||||||
|
return VimPlugin.getChange().deleteCharacter(editor, caret, countModifier(count), false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.maddyhome.idea.vim.action.change.delete
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext
|
|
||||||
import com.intellij.openapi.editor.Caret
|
|
||||||
import com.intellij.openapi.editor.Editor
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
|
||||||
import com.maddyhome.idea.vim.command.Argument
|
|
||||||
import com.maddyhome.idea.vim.command.Command
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|
||||||
|
|
||||||
class DeleteCharacterLeftAction : ChangeEditorActionHandler.ForEachCaret() {
|
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
|
||||||
caret: Caret,
|
|
||||||
context: DataContext,
|
|
||||||
count: Int,
|
|
||||||
rawCount: Int,
|
|
||||||
argument: Argument?): Boolean {
|
|
||||||
return VimPlugin.getChange().deleteCharacter(editor, caret, -count, false)
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
|
||||||
* Copyright (C) 2003-2020 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.maddyhome.idea.vim.action.change.delete
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext
|
|
||||||
import com.intellij.openapi.editor.Caret
|
|
||||||
import com.intellij.openapi.editor.Editor
|
|
||||||
import com.maddyhome.idea.vim.VimPlugin
|
|
||||||
import com.maddyhome.idea.vim.command.Argument
|
|
||||||
import com.maddyhome.idea.vim.command.Command
|
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|
||||||
|
|
||||||
class DeleteCharacterRightAction : ChangeEditorActionHandler.ForEachCaret() {
|
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
|
||||||
|
|
||||||
override fun execute(editor: Editor,
|
|
||||||
caret: Caret,
|
|
||||||
context: DataContext,
|
|
||||||
count: Int,
|
|
||||||
rawCount: Int,
|
|
||||||
argument: Argument?): Boolean {
|
|
||||||
return VimPlugin.getChange().deleteCharacter(editor, caret, count, 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
|
||||||
@@ -28,12 +28,14 @@ import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
|||||||
class DeleteEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
class DeleteEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
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().deleteEndOfLine(editor, caret, count)
|
return VimPlugin.getChange().deleteEndOfLine(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
|
||||||
@@ -30,18 +30,22 @@ import com.maddyhome.idea.vim.option.OptionsManager.ideajoin
|
|||||||
class DeleteJoinLinesAction : ChangeEditorActionHandler.SingleExecution() {
|
class DeleteJoinLinesAction : ChangeEditorActionHandler.SingleExecution() {
|
||||||
override val type: Command.Type = Command.Type.DELETE
|
override val type: Command.Type = Command.Type.DELETE
|
||||||
|
|
||||||
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 {
|
||||||
if (editor.isOneLineMode) return false
|
if (editor.isOneLineMode) return false
|
||||||
if (ideajoin.isSet) {
|
if (ideajoin.isSet) {
|
||||||
return VimPlugin.getChange().joinViaIdeaByCount(editor, context, count)
|
return VimPlugin.getChange().joinViaIdeaByCount(editor, context, count)
|
||||||
}
|
}
|
||||||
VimPlugin.getEditor().notifyIdeaJoin(editor.project)
|
VimPlugin.getEditor().notifyIdeaJoin(editor.project)
|
||||||
val res = Ref.create(true)
|
val res = Ref.create(true)
|
||||||
editor.caretModel.runForEachCaret({ caret: Caret -> if (!VimPlugin.getChange().deleteJoinLines(editor, caret, count, false)) res.set(false) }, true)
|
editor.caretModel.runForEachCaret({ caret: Caret ->
|
||||||
|
if (!VimPlugin.getChange().deleteJoinLines(editor, caret, count, false)) res.set(false)
|
||||||
|
}, true)
|
||||||
return res.get()
|
return res.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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
|
||||||
@@ -33,12 +33,14 @@ class DeleteMotionAction : ChangeEditorActionHandler.ForEachCaret(), DuplicableO
|
|||||||
|
|
||||||
override val duplicateWith: Char = 'd'
|
override val duplicateWith: Char = 'd'
|
||||||
|
|
||||||
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 {
|
||||||
if (argument == null) return false
|
if (argument == null) return false
|
||||||
val (first, second) = VimPlugin.getChange()
|
val (first, second) = VimPlugin.getChange()
|
||||||
.getDeleteRangeAndType(editor, caret, context, count, rawCount, argument, false) ?: return false
|
.getDeleteRangeAndType(editor, caret, context, count, rawCount, argument, false) ?: return 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
|
||||||
@@ -36,11 +36,13 @@ class DeleteVisualAction : 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 selectionType = range.type
|
val selectionType = range.type
|
||||||
return VimPlugin.getChange().deleteRange(editor, caret, range.toVimTextRange(false), selectionType, false)
|
return VimPlugin.getChange().deleteRange(editor, caret, range.toVimTextRange(false), selectionType, 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
|
||||||
@@ -29,6 +29,7 @@ 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.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,19 +40,23 @@ class DeleteVisualLinesAction : 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 {
|
||||||
val textRange = range.toVimTextRange(false)
|
val textRange = range.toVimTextRange(false)
|
||||||
val (usedCaret, usedRange, usedType) = when (range.type) {
|
val (usedCaret, usedRange, usedType) = when (range.type) {
|
||||||
SelectionType.BLOCK_WISE -> Triple(editor.caretModel.primaryCaret, textRange, range.type)
|
SelectionType.BLOCK_WISE -> Triple(editor.caretModel.primaryCaret, textRange, range.type)
|
||||||
SelectionType.LINE_WISE -> Triple(caret, textRange, SelectionType.LINE_WISE)
|
SelectionType.LINE_WISE -> Triple(caret, textRange, SelectionType.LINE_WISE)
|
||||||
SelectionType.CHARACTER_WISE -> {
|
SelectionType.CHARACTER_WISE -> {
|
||||||
|
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, textRange.endOffset)
|
||||||
|
val endsWithNewLine = if (lineEndForOffset == editor.fileSize) 0 else 1
|
||||||
val lineRange = TextRange(
|
val lineRange = TextRange(
|
||||||
EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
||||||
EditorHelper.getLineEndForOffset(editor, textRange.endOffset) + 1
|
lineEndForOffset + endsWithNewLine
|
||||||
)
|
)
|
||||||
Triple(caret, lineRange, SelectionType.LINE_WISE)
|
Triple(caret, lineRange, SelectionType.LINE_WISE)
|
||||||
}
|
}
|
||||||
|
@@ -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,6 +29,7 @@ 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.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,8 +58,9 @@ class DeleteVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
|||||||
VimPlugin.getChange()
|
VimPlugin.getChange()
|
||||||
.deleteRange(editor, editor.caretModel.primaryCaret, blockRange, SelectionType.BLOCK_WISE, false)
|
.deleteRange(editor, editor.caretModel.primaryCaret, blockRange, SelectionType.BLOCK_WISE, false)
|
||||||
} 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().deleteRange(editor, caret, lineRange, SelectionType.LINE_WISE, false)
|
VimPlugin.getChange().deleteRange(editor, caret, lineRange, SelectionType.LINE_WISE, 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
|
||||||
|
@@ -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
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user