mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
185 Commits
0.61.1-EAP
...
0.64.2-EAP
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c9fd0782ae | ||
![]() |
c5779935d3 | ||
![]() |
70154d4526 | ||
![]() |
070dfae93d | ||
![]() |
4e5fc734e2 | ||
![]() |
9004749754 | ||
![]() |
e42e7b81ef | ||
![]() |
e788221099 | ||
![]() |
e96b383339 | ||
![]() |
e63044e72f | ||
![]() |
0ac530eb86 | ||
![]() |
c1fd63ab25 | ||
![]() |
fd0d010908 | ||
![]() |
de159d6e3a | ||
![]() |
27293c3d36 | ||
![]() |
ffe55f05ba | ||
![]() |
d3b9a5af37 | ||
![]() |
d7772bec48 | ||
![]() |
c2e32d8989 | ||
![]() |
cdbff1ef64 | ||
![]() |
7d20053401 | ||
![]() |
7029346d8d | ||
![]() |
544f268ab8 | ||
![]() |
7dd10474c4 | ||
![]() |
f851794cf2 | ||
![]() |
0ccc0f0846 | ||
![]() |
40d1b2ddd5 | ||
![]() |
a219be6810 | ||
![]() |
fee3f03e17 | ||
![]() |
62128a14e7 | ||
![]() |
47b604c6a7 | ||
![]() |
9fc9cdc9f3 | ||
![]() |
5daa654d10 | ||
![]() |
8c51c699e9 | ||
![]() |
913fb0648b | ||
![]() |
1eacb09f3c | ||
![]() |
efcfceef39 | ||
![]() |
e977ae9e88 | ||
![]() |
b7c8d2f34c | ||
![]() |
51f1e6f866 | ||
![]() |
28abf15720 | ||
![]() |
6b9a295549 | ||
![]() |
c63a0200b3 | ||
![]() |
5fdb817bfd | ||
![]() |
1b5bdf5db3 | ||
![]() |
8022ed450c | ||
![]() |
255734acc5 | ||
![]() |
34b0c93ecd | ||
![]() |
2221e5234d | ||
![]() |
8dd8cce491 | ||
![]() |
d74965d36d | ||
![]() |
cb9e6c4c69 | ||
![]() |
1d93edd35b | ||
![]() |
4c071b9d97 | ||
![]() |
570eceb653 | ||
![]() |
a34a01745c | ||
![]() |
a4b9fa0f69 | ||
![]() |
2da18fe59f | ||
![]() |
5a969d573a | ||
![]() |
0eff36a38e | ||
![]() |
241bacfd49 | ||
![]() |
b292644531 | ||
![]() |
3264837478 | ||
![]() |
70bf5033b5 | ||
![]() |
9ffe114aeb | ||
![]() |
75f6e08d85 | ||
![]() |
3b0c19fbfc | ||
![]() |
e4d10eb622 | ||
![]() |
9cc4783415 | ||
![]() |
762bd81611 | ||
![]() |
6afdfb55ca | ||
![]() |
cb3508b30d | ||
![]() |
171ffc6862 | ||
![]() |
0f19b7415f | ||
![]() |
38019cdb91 | ||
![]() |
89bcb43271 | ||
![]() |
5101dc00b3 | ||
![]() |
a7774349e5 | ||
![]() |
b309e9d4bd | ||
![]() |
ba3fdbe142 | ||
![]() |
645d53f13b | ||
![]() |
838c6361de | ||
![]() |
6cb1d4ad1f | ||
![]() |
28dfda1370 | ||
![]() |
c73b8cf795 | ||
![]() |
807777f022 | ||
![]() |
866488ac0f | ||
![]() |
10097e3d6e | ||
![]() |
becb22a6b0 | ||
![]() |
37fcecfdd8 | ||
![]() |
c4144eb3d2 | ||
![]() |
d29244efcc | ||
![]() |
8901ba0128 | ||
![]() |
b07342baef | ||
![]() |
4d69f984b8 | ||
![]() |
e1149907ce | ||
![]() |
263376ae92 | ||
![]() |
07abc2e2e0 | ||
![]() |
7eba54f09a | ||
![]() |
1eac924291 | ||
![]() |
3ffe250f78 | ||
![]() |
15d173e628 | ||
![]() |
b24424330c | ||
![]() |
ebffa83f17 | ||
![]() |
6abc71a57d | ||
![]() |
8afb20c53b | ||
![]() |
501541b8be | ||
![]() |
e56f63dc0f | ||
![]() |
7e0c33f9a0 | ||
![]() |
bb1b8363d9 | ||
![]() |
e5e585443d | ||
![]() |
d0888a063f | ||
![]() |
bd5781a039 | ||
![]() |
a643c75e7f | ||
![]() |
d4db40f9cc | ||
![]() |
788489119b | ||
![]() |
665adaa44b | ||
![]() |
9f19ee9586 | ||
![]() |
bb84b0e368 | ||
![]() |
7976fdd019 | ||
![]() |
0d3b45189b | ||
![]() |
7005cb0268 | ||
![]() |
81421d918a | ||
![]() |
e3fe198fc1 | ||
![]() |
76d62771e0 | ||
![]() |
4da538302d | ||
![]() |
b981193f19 | ||
![]() |
c656da5c75 | ||
![]() |
dcedf6abca | ||
![]() |
849a71bdac | ||
![]() |
534cc1d1fe | ||
![]() |
40ec6c53fa | ||
![]() |
b7cb3c0945 | ||
![]() |
69d3c7b754 | ||
![]() |
542f11804e | ||
![]() |
8526054aa8 | ||
![]() |
93700bddc7 | ||
![]() |
494500041b | ||
![]() |
011a5a3b23 | ||
![]() |
03726858f0 | ||
![]() |
c8c42cc4b2 | ||
![]() |
0b22b454e6 | ||
![]() |
f4fe03c582 | ||
![]() |
964e87fd6a | ||
![]() |
ec4c0a0d0d | ||
![]() |
f9cf62472c | ||
![]() |
ace584d294 | ||
![]() |
5cd669202b | ||
![]() |
4a09848720 | ||
![]() |
f998f1be9f | ||
![]() |
3352bdfabb | ||
![]() |
ce43a9648f | ||
![]() |
440a0bf393 | ||
![]() |
64a7555f42 | ||
![]() |
3aa6fe3dc0 | ||
![]() |
3522228d45 | ||
![]() |
9b42d9a5c6 | ||
![]() |
4e8d98f956 | ||
![]() |
f6c3d27bbc | ||
![]() |
21daf83fbd | ||
![]() |
7f1203c207 | ||
![]() |
89b1f90973 | ||
![]() |
8002a5497f | ||
![]() |
770d12d79b | ||
![]() |
7e4ac22d23 | ||
![]() |
4f4b26d3e1 | ||
![]() |
4ea7c421a8 | ||
![]() |
3c8b7e2de4 | ||
![]() |
b13acaf823 | ||
![]() |
709cd6ad6e | ||
![]() |
1316ccc56f | ||
![]() |
881ddd0e11 | ||
![]() |
49611ee6b9 | ||
![]() |
539465bb56 | ||
![]() |
bc54a73d69 | ||
![]() |
5eb12f5d14 | ||
![]() |
557e47650f | ||
![]() |
f50753bfd7 | ||
![]() |
7a164d6d5f | ||
![]() |
60bc936cd9 | ||
![]() |
d097e636ea | ||
![]() |
3ce2bbb624 | ||
![]() |
4926d2554e | ||
![]() |
eae135acba | ||
![]() |
8ce3801b87 |
@@ -5,17 +5,27 @@
|
||||
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
||||
</ManuallySuppressedIssues>
|
||||
<CurrentIssues>
|
||||
<ID>ComplexCondition:CommandParser.kt$CommandParser$Character.isLetter(ch) || command.isEmpty() && "~<>@=#*&!".indexOf(ch) >= 0 || command.isNotEmpty() && ch == command[command.length - 1] && "<>".indexOf(ch) >= 0</ID>
|
||||
<ID>ComplexMethod:CommandParser.kt$CommandParser$ @kotlin.jvm.Throws(ExException::class) fun parse(cmd: String): ExCommand</ID>
|
||||
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ComplexMethod:NerdTree.kt$NerdTree$private fun registerCommands()</ID>
|
||||
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any> ): List<Int></ID>
|
||||
<ID>ComplexMethod:SearchHelperKt.kt$// bounds are considered inside corresponding quotes fun checkInString(chars: CharSequence, currentPos: Int, str: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:SearchHighlightsHelper.kt$ private fun updateSearchHighlights( pattern: String?, shouldIgnoreSmartCase: Boolean, showHighlights: Boolean, initialOffset: Int, searchRange: LineRange?, forwards: Boolean, forceUpdate: Boolean ): Int</ID>
|
||||
<ID>ComplexMethod:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ComplexMethod:VimExchangeExtension.kt$VimExchangeExtension.Operator$private fun compareExchanges(x: Exchange, y: Exchange): ExchangeCompareResult</ID>
|
||||
<ID>ComplexMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ComplexMethod:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>LongMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>LongMethod:CommandParser.kt$CommandParser$ @kotlin.jvm.Throws(ExException::class) fun parse(cmd: String): ExCommand</ID>
|
||||
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>LongMethod:NerdTree.kt$NerdTree$private fun registerCommands()</ID>
|
||||
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>LongMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any> ): List<Int></ID>
|
||||
<ID>LongMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>LoopWithTooManyJumpStatements:NerdTree.kt$NerdTree$while (true) { row++ val nextPath = tree.getPathForRow(row) ?: break val pathCount = nextPath.pathCount if (pathCount == currentPathCount) expectedRow = row if (pathCount < currentPathCount) break }</ID>
|
||||
<ID>LoopWithTooManyJumpStatements:SearchHighlightsHelper.kt$for (project in projectManager.openProjects) { val current = FileEditorManager.getInstance(project).selectedTextEditor ?: continue // [VERSION UPDATE] 202+ Use editors val editors = EditorFactory.getInstance().getEditors(current.document, project) ?: continue for (editor in editors) { // Try to keep existing highlights if possible. Update if hlsearch has changed or if the pattern has changed. // Force update for the situations where the text is the same, but the ignore case values have changed. // E.g. Use `*` to search for a word (which ignores smartcase), then use `/<Up>` to search for the same pattern, // which will match smartcase. Or changing the smartcase/ignorecase settings if (shouldRemoveSearchHighlights(editor, pattern, showHighlights) || forceUpdate) { removeSearchHighlights(editor) } if (pattern == null) continue if (shouldAddAllSearchHighlights(editor, pattern, showHighlights)) { // hlsearch (+ incsearch/noincsearch) val startLine = searchRange?.startLine ?: 0 val endLine = searchRange?.endLine ?: -1 val results = SearchHelper.findAll(editor, pattern, startLine, endLine, shouldIgnoreCase(pattern, shouldIgnoreSmartCase)) if (results.isNotEmpty()) { currentMatchOffset = findClosestMatch(editor, results, initialOffset, forwards) highlightSearchResults(editor, pattern, results, currentMatchOffset) } editor.vimLastSearch = pattern } else if (shouldAddCurrentMatchSearchHighlight(pattern, showHighlights, initialOffset)) { // nohlsearch + incsearch val searchOptions = EnumSet.of(SearchOptions.WHOLE_FILE) if (wrapscan.isSet) searchOptions.add(SearchOptions.WRAP) if (shouldIgnoreSmartCase) searchOptions.add(SearchOptions.IGNORE_SMARTCASE) if (!forwards) searchOptions.add(SearchOptions.BACKWARDS) val result = SearchHelper.findPattern(editor, pattern, initialOffset, 1, searchOptions) if (result != null) { currentMatchOffset = result.startOffset val results = listOf(result) highlightSearchResults(editor, pattern, results, currentMatchOffset) } } else if (shouldMaintainCurrentMatchOffset(pattern, initialOffset)) { // incsearch. If nothing has changed (e.g. we've edited offset values in `/foo/e+2`) make sure we return the // current match offset so the caret remains at the current incsarch match val offset = editor.vimIncsearchCurrentMatchOffset if (offset != null) { currentMatchOffset = offset } } } }</ID>
|
||||
<ID>MagicNumber:ActionListHandler.kt$ActionListHandler$50</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
||||
@@ -33,9 +43,10 @@
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$999999999</ID>
|
||||
<ID>MagicNumber:CommandParser.kt$CommandParser$10</ID>
|
||||
<ID>MagicNumber:CommandParser.kt$CommandParser$3</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$6</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
||||
<ID>MagicNumber:EditorHelper.kt$10</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
||||
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
||||
@@ -50,6 +61,7 @@
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$50</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
||||
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
||||
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
||||
@@ -61,85 +73,29 @@
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
||||
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
||||
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger<ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: $pluginId")</ID>
|
||||
<ID>MaxLineLength:ExRanges.kt$SearchRange$override</ID>
|
||||
<ID>MaxLineLength:EditorDataContext.kt$EditorDataContext$class</ID>
|
||||
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger<ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: ${this.pluginDescriptor.pluginId}")</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set clipboard+=ideaput", "ideaput") { OptionsManager.clipboard.append(ClipboardOptionsData.ideaput) })</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$private inner</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$val successNotification = Notification(IDEAVIM_NOTIFICATION_ID, IDEAVIM_NOTIFICATION_TITLE, "<code>$optionName</code> is enabled", NotificationType.INFORMATION)</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$private</ID>
|
||||
<ID>MaxLineLength:PutLinesHandler.kt$PutLinesHandler$val textData = registerGroup.lastRegister?.let { PutData.TextData(it.text ?: StringHelper.toKeyNotation(it.keys), SelectionType.LINE_WISE, it.transferableData) }</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBaseAction$val textData = if (lastRegister != null) TextData(lastRegister.text ?: StringHelper.toKeyNotation(lastRegister.keys), lastRegister.type, lastRegister.transferableData) else null</ID>
|
||||
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Operator$val visualSelection = PutData.VisualSelection(mapOf(editor.caretModel.primaryCaret to VimSelection.create(range.startOffset, range.endOffset - 1, selectionType, editor)), selectionType)</ID>
|
||||
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&build=$buildNumber&pluginVersion=$version&os=$os&uuid=$uid"</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$@JvmField val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_END, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_UP, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_DOWN, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)).build()</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList<Range> = mutableListOf()</ID>
|
||||
<ID>NestedBlockDepth:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:ActionBeanClass.kt$ActionBeanClass$fun getParsedModes(): Set<MappingMode>?</ID>
|
||||
<ID>ReturnCount:Alias.kt$Alias$fun getCommand(input: String, count: Int): String</ID>
|
||||
<ID>ReturnCount:CmdFilterHandler.kt$CmdFilterHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:CommandGroup.kt$CommandGroup$fun isAlias(command: String): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesAction.kt$DeleteJoinLinesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesSpacesAction.kt$DeleteJoinLinesSpacesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesAction.kt$DeleteJoinVisualLinesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesSpacesAction.kt$DeleteJoinVisualLinesSpacesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteMotionAction.kt$DeleteMotionAction$override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:EditFileHandler.kt$EditFileHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:EditorHelper.kt$ fun Editor.isPrimaryEditor(): Boolean</ID>
|
||||
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</ID>
|
||||
<ID>ReturnCount:FilterMotionAction.kt$FilterMotionAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:GotoCharacterHandler.kt$GotoCharacterHandler$override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:Helper.kt$@Suppress("IncorrectParentDisposable") fun Editor.isTemplateActive(): Boolean</ID>
|
||||
<ID>ReturnCount:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:IdeaSelectionControl.kt$IdeaSelectionControl$ fun predictMode(editor: Editor, selectionSource: VimListenerManager.SelectionSource): CommandState.Mode</ID>
|
||||
<ID>ReturnCount:MapHandler.kt$MapHandler$@Throws(ExException::class) private fun executeCommand(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:Marks.kt$IntellijMark$private fun getProject(): Project?</ID>
|
||||
<ID>ReturnCount:Marks.kt$VimMark.Companion$@JvmStatic fun create(key: Char?, logicalLine: Int?, col: Int?, filename: String?, protocol: String?): VimMark?</ID>
|
||||
<ID>ReturnCount:ModalEntry.kt$ModalEntry.<no name provided>$override fun dispatchKeyEvent(e: KeyEvent): Boolean</ID>
|
||||
<ID>ReturnCount:MotionScrollLastScreenLinePageStartAction.kt$MotionScrollLastScreenLinePageStartAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OperatorAction.kt$OperatorAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun getProviderForPasteViaIde(context: DataContext, typeInRegister: SelectionType, data: PutData): PasteProvider?</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ReturnCount:PutLinesHandler.kt$PutLinesHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:ReloadVimRc.kt$VimRcFileState$fun equalTo(document: Document): Boolean</ID>
|
||||
<ID>ReturnCount:RepeatHandler.kt$RepeatHandler$@Throws(ExException::class) override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:SelectMotionRightAction.kt$SelectMotionRightAction$override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int</ID>
|
||||
<ID>ReturnCount:ShowCmd.kt$ShowCmd$fun getFullText(editor: Editor?): String</ID>
|
||||
<ID>ReturnCount:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ReturnCount:TextObjectActionHandler.kt$TextObjectActionHandler$ final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun redo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun undo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:VimExchangeExtension.kt$VimExchangeExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic fun inputString(editor: Editor, prompt: String, finishOn: Char?): String</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.SkipOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$@Throws(ExException::class) fun evaluate(expression: String, globals: Map<String?, Any?>): Any</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$fun findOrCreateIdeaVimRc(): File?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun getKeyStroke(e: AnActionEvent): KeyStroke?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler$override fun execute(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockAppendAction.kt$VisualBlockAppendAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockInsertAction.kt$VisualBlockInsertAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$ fun toggleVisual(editor: Editor, count: Int, rawCount: Int, subMode: CommandState.SubMode): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun autodetectVisualSubmode(editor: Editor): CommandState.SubMode</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun selectPreviousVisualMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun swapVisualSelections(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualOperatorActionHandler.kt$VisualOperatorActionHandler$final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:YankGroup.kt$YankGroup$ fun yankMotion(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument): Boolean</ID>
|
||||
<ID>ThrowsCount:CommandHandler.kt$CommandHandler$private fun checkArgs(cmd: ExCommand)</ID>
|
||||
<ID>TooGenericExceptionThrown:CommandParser.kt$CommandParser$throw RuntimeException("Cannot create an ex command: $handlerHolder")</ID>
|
||||
<ID>TooManyFunctions:CommandBuilder.kt$CommandBuilder</ID>
|
||||
<ID>TooManyFunctions:CommandState.kt$CommandState</ID>
|
||||
<ID>TooManyFunctions:PutGroup.kt$PutGroup</ID>
|
||||
<ID>TooManyFunctions:Ranges.kt$Ranges</ID>
|
||||
<ID>TooManyFunctions:SearchHighlightsHelper.kt$com.maddyhome.idea.vim.helper.SearchHighlightsHelper.kt</ID>
|
||||
<ID>TooManyFunctions:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
|
||||
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
||||
</CurrentIssues>
|
||||
|
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
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "doc"]
|
||||
path = doc
|
||||
url = https://github.com/JetBrains/ideavim.wiki.git
|
3
.idea/inspectionProfiles/Project_Default.xml
generated
3
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HardCodedStringLiteral" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<scope name="Production" level="WARNING" enabled="false">
|
||||
<option name="ignoreForAssertStatements" value="true" />
|
||||
@@ -28,8 +29,8 @@
|
||||
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_requireAnnotationsFirst" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MoveVariableDeclarationIntoWhen" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlI18n" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
2
.idea/inspectionProfiles/Qodana.xml
generated
2
.idea/inspectionProfiles/Qodana.xml
generated
@@ -2,6 +2,7 @@
|
||||
<profile version="1.0">
|
||||
<description>Inspections profile for Qodana</description>
|
||||
<option name="myName" value="Qodana" />
|
||||
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CanBeFinal" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="REPORT_CLASSES" value="false" />
|
||||
<option name="REPORT_METHODS" value="false" />
|
||||
@@ -41,7 +42,6 @@
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim full verification" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
|
1
.idea/runConfigurations/IdeaVim_tests.xml
generated
1
.idea/runConfigurations/IdeaVim_tests.xml
generated
@@ -1,5 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim tests" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Start IJ with IdeaVim" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
|
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.Nvim
|
||||
import _Self.buildTypes.PluginVerifier
|
||||
import _Self.buildTypes.Release
|
||||
import _Self.buildTypes.ReleaseEap
|
||||
import _Self.buildTypes.TestsForIntelliJ20181
|
||||
import _Self.buildTypes.TestsForIntelliJ20182
|
||||
import _Self.buildTypes.TestsForIntelliJ20183
|
||||
import _Self.buildTypes.TestsForIntelliJ20191
|
||||
import _Self.buildTypes.TestsForIntelliJ20192
|
||||
import _Self.buildTypes.TestsForIntelliJ20193
|
||||
import _Self.buildTypes.TestsForIntelliJ20201
|
||||
import _Self.buildTypes.PropertyBased
|
||||
import _Self.buildTypes.Qodana
|
||||
import _Self.buildTypes.TestsForIntelliJ20202
|
||||
import _Self.buildTypes.TestsForIntelliJ20203
|
||||
import _Self.buildTypes.TestsForIntelliJEAP
|
||||
import _Self.subprojects.OldTests
|
||||
import _Self.subprojects.Releases
|
||||
import _Self.vcsRoots.Branch_181
|
||||
import _Self.vcsRoots.Branch_183
|
||||
import _Self.vcsRoots.Branch_191_193
|
||||
import _Self.vcsRoots.Branch_201
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||
|
||||
object Project : Project({
|
||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||
|
||||
subProjects(Releases, OldTests)
|
||||
|
||||
// VCS roots
|
||||
vcsRoot(Branch_183)
|
||||
vcsRoot(Branch_181)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
vcsRoot(Branch_191_193)
|
||||
vcsRoot(Branch_201)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
|
||||
// Builds
|
||||
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(TestsForIntelliJ20203)
|
||||
buildType(TestsForIntelliJEAP)
|
||||
|
||||
buildType(PropertyBased)
|
||||
|
||||
buildType(Nvim)
|
||||
buildType(PluginVerifier)
|
||||
|
||||
buildType(Qodana)
|
||||
|
||||
// Unknown staff generated by TeamCity
|
||||
features {
|
||||
feature {
|
||||
id = "PROJECT_EXT_768"
|
||||
type = "CloudImage"
|
||||
id = "PROJECT_EXT_768"
|
||||
param("agent_pool_id", "41")
|
||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||
param("ebs-optimized", "false")
|
||||
param("image-instances-limit", "")
|
||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||
param("instance-type", "c5d.large")
|
||||
param("key-pair-name", "teamcity-prod-pub")
|
||||
param("profileId", "amazon-48")
|
||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||
param("source-id", "BuildAgentsIdeaVim")
|
||||
param("spot-instance-price", "0.1")
|
||||
param("subnet-id", "subnet-58839511")
|
||||
param("use-spot-instances", "true")
|
||||
param("user-tags", "project=idea-vim")
|
||||
param("agent_pool_id", "41")
|
||||
param("image-instances-limit", "")
|
||||
param("subnet-id", "subnet-58839511")
|
||||
param("ebs-optimized", "false")
|
||||
param("instance-type", "c5d.large")
|
||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||
param("spot-instance-price", "0.1")
|
||||
param("source-id", "BuildAgentsIdeaVim")
|
||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||
param("key-pair-name", "teamcity-prod-pub")
|
||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||
param("profileId", "amazon-48")
|
||||
param("instance-type", "c5d.xlarge")
|
||||
param("spot-instance-price", "0.12")
|
||||
}
|
||||
feature {
|
||||
id = "amazon-48"
|
||||
type = "CloudProfile"
|
||||
param("profileServerUrl", "")
|
||||
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||
param("system.cloud.profile_id", "amazon-48")
|
||||
param("total-work-time", "")
|
||||
param("description", "")
|
||||
id = "amazon-48"
|
||||
param("agentPushPreset", "")
|
||||
param("cloud-code", "amazon")
|
||||
param("description", "")
|
||||
param("enabled", "true")
|
||||
param("max-running-instances", "10")
|
||||
param("agentPushPreset", "")
|
||||
param("profileId", "amazon-48")
|
||||
param("name", "Cloud Agents")
|
||||
param("next-hour", "")
|
||||
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||
param("region", "eu-west-1")
|
||||
param("terminate-idle-time", "15")
|
||||
param("not-checked", "")
|
||||
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 TestsForIntelliJ20203 : ActiveTests("Tests for IntelliJ 2020.3", "2020.3")
|
||||
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 {
|
||||
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")
|
||||
}
|
||||
|
||||
|
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
|
||||
|
||||
import _Self.Constants.DEFAULT
|
||||
import _Self.Constants.DEV
|
||||
import _Self.Constants.EAP
|
||||
import _Self.Constants.VERSION
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
@@ -10,19 +14,19 @@ object Release : BuildType({
|
||||
description = "Build and publish IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.61"
|
||||
buildNumberPattern = VERSION
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||
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_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "$DEFAULT,$EAP,$DEV")
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
import _Self.Constants.EAP
|
||||
import _Self.Constants.VERSION
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
@@ -13,19 +15,19 @@ object ReleaseEap : BuildType({
|
||||
description = "Build and publish EAP of IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.61.%build.counter%"
|
||||
buildNumberPattern = "$VERSION.%build.counter%"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
label = "Token"
|
||||
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
|
||||
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_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", EAP)
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_slackUrl",
|
||||
"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 {
|
||||
vcsLabeling {
|
||||
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.
|
||||
*/
|
||||
|
||||
version = "2020.1"
|
||||
version = "2020.2"
|
||||
project(_Self.Project)
|
16
AUTHORS.md
16
AUTHORS.md
@@ -331,6 +331,22 @@ Contributors:
|
||||
[![icon][github]](https://github.com/antekone)
|
||||
|
||||
Grzegorz Antoniak
|
||||
* [![icon][mail]](mailto:shaunpatterson@gmail.com)
|
||||
[![icon][github]](https://github.com/shaunpatterson)
|
||||
|
||||
Shaun Patterson
|
||||
* [![icon][mail]](mailto:vladimir.petrenko@jetbrains.com)
|
||||
[![icon][github]](https://github.com/vladimir-petrenko)
|
||||
|
||||
Vladimir Petrenko
|
||||
* [![icon][mail]](mailto:sergey.vorobyov@jetbrains.com)
|
||||
[![icon][github]](https://github.com/DeveloperHacker)
|
||||
|
||||
Sergei Vorobyov
|
||||
* [![icon][mail]](mailto:daya0576@gmail.com)
|
||||
[![icon][github]](https://github.com/daya0576)
|
||||
|
||||
大牙(Henry Zhu)
|
||||
|
||||
If you are a contributor and your name is not listed here, feel free to
|
||||
contact the maintainers.
|
||||
|
45
CHANGES.md
45
CHANGES.md
@@ -25,15 +25,57 @@ usual beta standards.
|
||||
## To Be Released
|
||||
|
||||
### 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
|
||||
* [VIM-2218](https://youtrack.jetbrains.com/issue/VIM-2218) Fix some shortcuts for 2021.+
|
||||
* [VIM-2217](https://youtrack.jetbrains.com/issue/VIM-2217) Fix adding new line at the end of the file for the AppCode
|
||||
* [VIM-2220](https://youtrack.jetbrains.com/issue/VIM-2220) Do not try to get a commandState for null editor
|
||||
|
||||
### Merged PRs:
|
||||
* [269](https://github.com/JetBrains/ideavim/pull/269) by [大牙(Henry Zhu)](https://github.com/daya0576): fix invalid link of submodule docs
|
||||
|
||||
## 0.64, 2020-12-23
|
||||
|
||||
### Merged PRs:
|
||||
* [260](https://github.com/JetBrains/ideavim/pull/260) by [Matt Ellis](https://github.com/citizenmatt): Refactor SearchGroup
|
||||
|
||||
### Fixes:
|
||||
* [VIM-2194](https://youtrack.jetbrains.com/issue/VIM-2194) Fix caret shape during editing a new file
|
||||
|
||||
## 0.63, 2020-12-16
|
||||
|
||||
### Changes:
|
||||
* Update the minimal required IJ version: 2020.2+
|
||||
|
||||
### Fixes:
|
||||
* [CWM-927](https://youtrack.jetbrains.com/issue/CWM-927) Fix typing for CodeWithMe and IdeaVim
|
||||
|
||||
### Merged PRs:
|
||||
* [259](https://github.com/JetBrains/ideavim/pull/259) by [Vladimir Petrenko](https://github.com/vladimir-petrenko): CWM-927 disable vim for client's hidden editor on host
|
||||
|
||||
## 0.62, 2020-12-15
|
||||
|
||||
### Features:
|
||||
* Support `unmap` and `mapclear` commands [VIM-1491](https://youtrack.jetbrains.com/issue/VIM-1491)
|
||||
* Support mappings in ex panel (`cmap`) [VIM-1227](https://youtrack.jetbrains.com/issue/VIM-1227)
|
||||
|
||||
### Changes:
|
||||
* `octal` is now disabled by default for `nrformats`. [VIM-2181](https://youtrack.jetbrains.com/issue/VIM-2181)
|
||||
|
||||
### Fixes:
|
||||
* [VIM-2113](https://youtrack.jetbrains.com/issue/VIM-2113) Fix `cit` for empty tags
|
||||
* [VIM-2114](https://youtrack.jetbrains.com/issue/VIM-2114) Unnamed register isn't changed after deleting empty tag
|
||||
* [VIM-1475](https://youtrack.jetbrains.com/issue/VIM-1475) Enable block caret to be used in insert mode.
|
||||
* [VIM-2170](https://youtrack.jetbrains.com/issue/VIM-2170) Fix an alternative range format for `s` command
|
||||
* [VIM-1913](https://youtrack.jetbrains.com/issue/VIM-1913)
|
||||
[VIM-2154](https://youtrack.jetbrains.com/issue/VIM-2154) Several fixes for AppCode templates
|
||||
* [VIM-1756](https://youtrack.jetbrains.com/issue/VIM-1756) Fix startsel from insert mode
|
||||
|
||||
### Merged PRs:
|
||||
* [249](https://github.com/JetBrains/ideavim/pull/249) by [Jan Palus](https://github.com/jpalus): VIM-2113 Increase tag range only in visual mode
|
||||
@@ -41,6 +83,9 @@ usual beta standards.
|
||||
* [256](https://github.com/JetBrains/ideavim/pull/256) by [Brandon Conway](https://github.com/brandoncc): Fix typo
|
||||
* [254](https://github.com/JetBrains/ideavim/pull/254) by [Grzegorz Antoniak](https://github.com/antekone): VIM-1475: Add an option to use block caret in insert mode
|
||||
* [225](https://github.com/JetBrains/ideavim/pull/225) by [sumoooru2](https://github.com/sumoooru2): Implement cmap
|
||||
* [258](https://github.com/JetBrains/ideavim/pull/258) by [Matt Ellis](https://github.com/citizenmatt): Show the correct handler class in :map
|
||||
* [257](https://github.com/JetBrains/ideavim/pull/257) by [Matt Ellis](https://github.com/citizenmatt): Extract SearchHighlightsHelper from SearchGroup
|
||||
* [251](https://github.com/JetBrains/ideavim/pull/251) by [Shaun Patterson](https://github.com/shaunpatterson): VIM-1756: startSel works in insert mode
|
||||
|
||||
## 0.61, 2020-11-12
|
||||
|
||||
|
49
README.md
49
README.md
@@ -81,12 +81,12 @@ Here are some examples of supported vim features and commands:
|
||||
* Motion / deletion / change / window / etc. commands
|
||||
* Key mappings
|
||||
* Marks / Macros / Digraphs / Registers
|
||||
* Some [set commands](doc/set-commands.md)
|
||||
* Some [set commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands)
|
||||
* Full Vim regexps for search and search/replace
|
||||
* Vim web help
|
||||
* `~/.ideavimrc` configuration file
|
||||
|
||||
[Emulated Vim plugins](doc/emulated-plugins.md):
|
||||
[Emulated Vim plugins](https://github.com/JetBrains/ideavim/wiki/Emulated-plugins):
|
||||
|
||||
* vim-easymotion
|
||||
* vim-surround
|
||||
@@ -144,21 +144,38 @@ set idearefactormode=keep
|
||||
map <leader>f <Plug>(easymotion-s)
|
||||
map <leader>e <Plug>(easymotion-f)
|
||||
|
||||
map <leader>d :action Debug<CR>
|
||||
map <leader>r :action RenameElement<CR>
|
||||
map <leader>c :action Stop<CR>
|
||||
map <leader>z :action ToggleDistractionFreeMode<CR>
|
||||
map <leader>d <Action>(Debug)
|
||||
map <leader>r <Action>(RenameElement)
|
||||
map <leader>c <Action>(Stop)
|
||||
map <leader>z <Action>(ToggleDistractionFreeMode)
|
||||
|
||||
map <leader>s :action SelectInProjectView<CR>
|
||||
map <leader>a :action Annotate<CR>
|
||||
map <leader>h :action Vcs.ShowTabbedFileHistory<CR>
|
||||
map <S-Space> :action GotoNextError<CR>
|
||||
map <leader>s <Action>(SelectInProjectView)
|
||||
map <leader>a <Action>(Annotate)
|
||||
map <leader>h <Action>(Vcs.ShowTabbedFileHistory)
|
||||
map <S-Space> <Action>(GotoNextError)
|
||||
|
||||
map <leader>b :action ToggleLineBreakpoint<CR>
|
||||
map <leader>o :action FileStructurePopup<CR>
|
||||
map <leader>b <Action>(ToggleLineBreakpoint)
|
||||
map <leader>o <Action>(FileStructurePopup)
|
||||
```
|
||||
</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:
|
||||
@@ -181,7 +198,7 @@ Put your settings to `$XDG_CONFIG_HOME/ideavim/ideavimrc` file.
|
||||
Emulated Vim Plugins
|
||||
--------------------
|
||||
|
||||
See [doc/emulated-plugins.md](doc/emulated-plugins.md)
|
||||
See [doc/emulated-plugins.md](https://github.com/JetBrains/ideavim/wiki/Emulated-plugins)
|
||||
|
||||
Executing IDE Actions
|
||||
---------------------
|
||||
@@ -240,15 +257,15 @@ IdeaVim tips and tricks
|
||||
- `set ideajoin` to enable join via the IDE. See the [examples](https://jb.gg/f9zji9).
|
||||
- Make sure `ideaput` is enabled for `clipboard` to enable native IJ insertion in Vim.
|
||||
- Sync IJ bookmarks and Vim marks: `set ideamarks`
|
||||
- Check out more [ex commands](doc/set-commands.md).
|
||||
- Check out more [ex commands](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||
|
||||
- Use your vim settings with IdeaVim. Put `source ~/.vimrc` in `~/.ideavimrc`.
|
||||
> :warning: Please note that IdeaVim currently parses `~/.ideavimrc` & `~/.vimrc` files via simple pattern-matching.
|
||||
See [VIM-669](https://youtrack.jetbrains.com/issue/VIM-669) for proper parsing
|
||||
of VimL files.
|
||||
|
||||
- Control the status bar icon via the [`ideastatusicon` option](doc/set-commands.md).
|
||||
- Not familiar with the default behaviour during a refactoring? See the [`idearefactormode` option](doc/set-commands.md).
|
||||
- Control the status bar icon via the [`ideastatusicon` option](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||
- Not familiar with the default behaviour during a refactoring? See the [`idearefactormode` option](https://github.com/JetBrains/ideavim/wiki/%22set%22-commands).
|
||||
|
||||
Some facts about Vim
|
||||
-------
|
||||
|
27
build.gradle
27
build.gradle
@@ -14,8 +14,8 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.intellij' version '0.6.5'
|
||||
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
||||
id "org.jetbrains.changelog" version "0.6.2"
|
||||
id 'io.gitlab.arturbosch.detekt' version '1.15.0'
|
||||
id "org.jetbrains.changelog" version "1.0.1"
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
@@ -59,7 +59,7 @@ runIdeForUiTests {
|
||||
}
|
||||
|
||||
runPluginVerifier {
|
||||
ideVersions = ["IC-2020.1.4", "IC-2020.2.3"]
|
||||
ideVersions = ["IC-2020.2.3", "IC-2020.3.2"]
|
||||
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
||||
teamCityOutputFormat = true
|
||||
}
|
||||
@@ -75,9 +75,10 @@ dependencies {
|
||||
compileOnly "org.jetbrains:annotations:20.1.0"
|
||||
|
||||
// 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")
|
||||
}
|
||||
|
||||
@@ -111,6 +112,22 @@ tasks.detekt.jvmTarget = javaVersion
|
||||
task testWithNeovim(type: Test) {
|
||||
group = "verification"
|
||||
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 {
|
||||
|
1
doc
Submodule
1
doc
Submodule
Submodule doc added at 44ef1a858b
@@ -1,178 +0,0 @@
|
||||
Emulated Vim Plugins
|
||||
--------------------
|
||||
|
||||
IdeaVim extensions emulate plugins of the original Vim. In order to use
|
||||
IdeaVim extensions, you have to enable them via this command in your `~/.ideavimrc`:
|
||||
|
||||
```
|
||||
set <extension-name>
|
||||
```
|
||||
|
||||
If you reuse your existing `.vimrc` file using `source ~/.vimrc`, IdeaVim can parse and enable plugins that are defined
|
||||
using [vim-plug](https://github.com/junegunn/vim-plug) or [vundle](https://github.com/VundleVim/Vundle.vim).
|
||||
No additional set commands in `~/.ideavimrc` are required.
|
||||
If you'd like to disable some plugin that's enabled in `.vimrc`, you can use `set no<extension-name>`
|
||||
in `~/.ideavimrc`.
|
||||
|
||||
Available extensions:
|
||||
|
||||
## easymotion
|
||||
|
||||
* Setup:
|
||||
* Install [IdeaVim-EasyMotion](https://plugins.jetbrains.com/plugin/13360-ideavim-easymotion/)
|
||||
and [AceJump](https://plugins.jetbrains.com/plugin/7086-acejump/) plugins.
|
||||
* `set easymotion`
|
||||
* Emulates [vim-easymotion](https://github.com/easymotion/vim-easymotion)
|
||||
* Commands: All commands with the mappings are supported. See the [full list of supported commands](https://github.com/AlexPl292/IdeaVim-EasyMotion#supported-commands).
|
||||
|
||||
## surround
|
||||
|
||||
* Setup: `set surround`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tpope/vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'tpope/vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-surround'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=1697'</code>
|
||||
</details>
|
||||
* Emulates [vim-surround](https://github.com/tpope/vim-surround)
|
||||
* Commands: `ys`, `cs`, `ds`, `S`
|
||||
|
||||
## multiple-cursors
|
||||
|
||||
* Setup: `set multiple-cursors`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/terryma/vim-multiple-cursors'</code>
|
||||
<br/>
|
||||
<code>Plug 'terryma/vim-multiple-cursors'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-multiple-cursors'</code>
|
||||
</details>
|
||||
* Emulates [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)
|
||||
* Commands: `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>`
|
||||
|
||||
## commentary
|
||||
|
||||
* Setup: `set commentary`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tpope/vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'tpope/vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-commentary'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=3695'</code>
|
||||
<br/>
|
||||
<code>Plug 'tomtom/tcomment_vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'tcomment_vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=1173'</code>
|
||||
</details>
|
||||
* Emulates [commentary.vim](https://github.com/tpope/vim-commentary)
|
||||
* Commands: `gcc`, `gc + motion`, `v_gc`
|
||||
* By [Daniel Leong](https://github.com/dhleong)
|
||||
|
||||
## ReplaceWithRegister
|
||||
|
||||
* Setup: `set ReplaceWithRegister`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/vim-scripts/ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-scripts/ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://github.com/inkarkat/vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'inkarkat/vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-ReplaceWithRegister'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2703'</code>
|
||||
</details>
|
||||
* Emulates [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister)
|
||||
* Commands: `gr`, `grr`
|
||||
* By [igrekster](https://github.com/igrekster)
|
||||
|
||||
## argtextobj
|
||||
|
||||
* Setup:
|
||||
* `set argtextobj`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/vim-scripts/argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-scripts/argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'argtextobj.vim'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2699'</code>
|
||||
</details>
|
||||
* By default, only the arguments inside parenthesis are considered. To extend the functionality
|
||||
to other types of brackets, set `g:argtextobj_pairs` variable to a comma-separated
|
||||
list of colon-separated pairs (same as VIM's `matchpairs` option), like
|
||||
`let g:argtextobj_pairs="(:),{:},<:>"`. The order of pairs matters when
|
||||
handling symbols that can also be operators: `func(x << 5, 20) >> 17`. To handle
|
||||
this syntax parenthesis, must come before angle brackets in the list.
|
||||
* Emulates [argtextobj.vim](https://www.vim.org/scripts/script.php?script_id=2699)
|
||||
* Additional text objects: `aa`, `ia`
|
||||
|
||||
## exchange
|
||||
|
||||
* Setup: `set exchange`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/tommcdo/vim-exchange'</code>
|
||||
<br/>
|
||||
<code>Plug 'tommcdo/vim-exchange'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-exchange'</code>
|
||||
</details>
|
||||
* Emulates [vim-exchange](https://github.com/tommcdo/vim-exchange)
|
||||
* Commands: `cx`, `cxx`, `X`, `cxc`
|
||||
* By [fan-tom](https://github.com/fan-tom)
|
||||
|
||||
## textobj-entire
|
||||
|
||||
* Setup: `set textobj-entire`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/kana/vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'kana/vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-textobj-entire'</code>
|
||||
<br/>
|
||||
<code>Plug 'https://www.vim.org/scripts/script.php?script_id=2610'</code>
|
||||
</details>
|
||||
* Emulates [vim-textobj-entire](https://github.com/kana/vim-textobj-entire)
|
||||
* Additional text objects: `ae`, `ie`
|
||||
* By [Alexandre Grison](https://github.com/agrison)
|
||||
|
||||
## highlightedyank
|
||||
|
||||
* Setup:
|
||||
* `set highlightedyank`
|
||||
* <details>
|
||||
<summary>Alternative vim-plug / vundle syntax</summary>
|
||||
<code>Plug 'https://github.com/machakann/vim-highlightedyank'</code>
|
||||
<br/>
|
||||
<code>Plug 'machakann/vim-highlightedyank'</code>
|
||||
<br/>
|
||||
<code>Plug 'vim-highlightedyank'</code>
|
||||
</details>
|
||||
* if you want to optimize highlight duration, assign a time in milliseconds:
|
||||
`let g:highlightedyank_highlight_duration = "1000"`
|
||||
A negative number makes the highlight persistent.
|
||||
`let g:highlightedyank_highlight_duration = "-1"`
|
||||
* if you want to change background color of highlight you can provide the rgba of the color you want e.g.
|
||||
`let g:highlightedyank_highlight_color = "rgba(160, 160, 160, 155)"`
|
||||
* Emulates [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)
|
||||
* By [KostkaBrukowa](https://github.com/KostkaBrukowa)
|
@@ -1,51 +0,0 @@
|
||||
Some examples of join command with `ideajoin` option enabled.
|
||||
Put `set ideajoin` to your `~/.ideavimrc` to enable this functionality.
|
||||
|
||||
1) Automatic join concatenated lines:
|
||||
|
||||
```
|
||||
"Hello" + -> "Hello world"
|
||||
" world!"
|
||||
```
|
||||
|
||||
2) Nested if's:
|
||||
|
||||
```
|
||||
if (a) { -> if (a && b) {
|
||||
if (b) { ...
|
||||
... }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3) Remove braces from one line for / if / while:
|
||||
|
||||
```
|
||||
if (fail) { -> if (fail) return;
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
4) Kotlin one line method:
|
||||
|
||||
```
|
||||
fun myNumber(): Int { -> fun myNumber(): Int = 42
|
||||
return 42
|
||||
}
|
||||
```
|
||||
|
||||
5) Join declaration and initialization:
|
||||
|
||||
```
|
||||
int a; -> int a = 5;
|
||||
a = 5;
|
||||
```
|
||||
|
||||
6) Chain call:
|
||||
|
||||
```
|
||||
sb.append("a"); -> sb.append("a").append("b");
|
||||
sb.append("b");
|
||||
```
|
||||
|
||||
And other functions provided by the plugins.
|
@@ -1,136 +0,0 @@
|
||||
List of Supported Set Commands
|
||||
==============================
|
||||
|
||||
The following `:set` commands can appear in `~/.ideavimrc` or be set manually in the command mode:
|
||||
|
||||
'clipboard' 'cb' clipboard options
|
||||
Standard clipboard options plus
|
||||
|
||||
`ideaput` (default on) - IdeaVim ONLY
|
||||
enable native idea paste action for put operations
|
||||
|
||||
'digraph' 'dg' enable the entering of digraphs in Insert mode
|
||||
'gdefault' 'gd' the ":substitute" flag 'g' is by default
|
||||
'history' 'hi' number of command-lines that are remembered
|
||||
'hlsearch' 'hls' highlight matches with the last search pattern
|
||||
'ignorecase' 'ic' ignore case in search patterns
|
||||
'iskeyword' 'isk' defines keywords for commands like 'w', '*', etc.
|
||||
'incsearch' 'is' show where search pattern typed so far matches
|
||||
|
||||
`keymodel` `km` String (default "continueselect,stopselect")
|
||||
|
||||
List of comma separated words, which enable special things that keys
|
||||
can do. These values can be used:
|
||||
startsel Using a shifted special[1] key starts selection (either
|
||||
Select mode or Visual mode, depending on "key" being
|
||||
present in 'selectmode').
|
||||
stopsel Using a NOT-shifted special[1] key stops selection.
|
||||
Automatically enables `stopselect` and `stopvisual`
|
||||
stopselect Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
||||
select mode and removes selection.
|
||||
stopvisual Using a NOT-shifted special[1] key stops - IdeaVim ONLY
|
||||
visual mode and removes selection.
|
||||
continueselect Using a shifted arrow key doesn't - IdeaVim ONLY
|
||||
start selection, but in select mode
|
||||
acts like startsel is enabled
|
||||
continuevisual Using a shifted arrow key doesn't - IdeaVim ONLY
|
||||
start selection, but in visual mode
|
||||
acts like startsel is enabled
|
||||
|
||||
'matchpairs' 'mps' pairs of characters that "%" can match
|
||||
'more' 'more' When on, listings pause when the whole screen is filled.
|
||||
'nrformats' 'nf' number formats recognized for CTRL-A command
|
||||
'number' 'nu' print the line number in front of each line
|
||||
'relativenumber' 'rnu' show the line number relative to the line with
|
||||
the cursor
|
||||
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|
||||
'scrolljump' 'sj' minimum number of lines to scroll
|
||||
'scrolloff' 'so' minimum number of lines above and below the cursor
|
||||
'selection' 'sel' what type of selection to use
|
||||
|
||||
`selectmode` `slm` String (default "")
|
||||
|
||||
This is a comma-separated list of words, which specify when to start
|
||||
Select mode instead of Visual mode, when a selection is started.
|
||||
Possible values:
|
||||
mouse when using the mouse
|
||||
key when using shifted special[1] keys
|
||||
cmd when using "v", "V", or <C-V>
|
||||
ideaselection when IDE sets a selection - IdeaVim ONLY
|
||||
(examples: extend selection, wrap with while, etc.)
|
||||
|
||||
'showmode' 'smd' message on the status line to show current mode
|
||||
'showcmd' 'sc' show (partial) command in the status bar
|
||||
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
||||
'sidescrolloff' 'siso' min. number of columns to left and right of cursor
|
||||
'smartcase' 'scs' no ignore case when pattern is uppercase
|
||||
'timeout' 'to' use timeout for mapped key sequences
|
||||
'timeoutlen' 'tm' timeout duration for a mapped key sequence
|
||||
'undolevels' 'ul' maximum number of changes that can be undone
|
||||
'viminfo' 'vi' information to remember after restart
|
||||
'visualbell' 'vb' use visual bell instead of beeping
|
||||
'wrapscan' 'ws' searches wrap around the end of file
|
||||
|
||||
|
||||
|
||||
IdeaVim only commands:
|
||||
|
||||
`ideamarks` `ideamarks` Boolean (default true)
|
||||
|
||||
If true, creation of global mark will trigger creation of IDE's bookmark
|
||||
and vice versa.
|
||||
|
||||
`idearefactormode` `idearefactormode` String(default "select")
|
||||
|
||||
Define the mode that would be enabled during
|
||||
the refactoring (renaming, live template, introduce variable, etc)
|
||||
|
||||
Use one of the following values:
|
||||
- keep - keep the mode that was enabled before starting a refactoring
|
||||
- select - start refactoring in select mode
|
||||
- visual - start refactoring in visual mode
|
||||
|
||||
This option has effect if you are in normal, insert or replace mode before refactoring start.
|
||||
Visual or select mode are not changed.
|
||||
|
||||
|
||||
`ideajoin` `ideajoin` Boolean (default false)
|
||||
|
||||
If true, join command will be performed via IDE
|
||||
See wiki/`ideajoin` examples
|
||||
|
||||
`ideastatusicon` `ideastatusicon` String(default "enabled")
|
||||
|
||||
Define the behavior of IdeaVim icon in the status bar.
|
||||
|
||||
Use one of the following values:
|
||||
- enabled - icon is shown in the status bar
|
||||
- gray - use the gray version of the icon
|
||||
- disabled - hide the icon
|
||||
|
||||
`ideawrite` `ideawrite` String (default "all")
|
||||
"file" or "all". Defines the behaviour of ":w" command.
|
||||
Value "all" enables execution of ":wa" (save all) command on ":w" (save).
|
||||
This feature exists because some IJ options like "Prettier on save" or "ESlint on save"
|
||||
work only with "save all" action. If this option is set to "all", these actions work
|
||||
also with ":w" command.
|
||||
|
||||
`lookupkeys` `lookupkeys` List of strings
|
||||
|
||||
List of keys that should be processed by the IDE during the active lookup (autocompletion).
|
||||
For example, <Tab> and <Enter> are used by the IDE to finish the lookup,
|
||||
but <C-W> should be passed to IdeaVim.
|
||||
Default value:
|
||||
"<Tab>", "<Down>", "<Up>", "<Enter>", "<Left>", "<Right>",
|
||||
"<C-Down>", "<C-Up>", "<PageUp>", "<PageDown>",
|
||||
"<C-J>", "<C-Q>"
|
||||
|
||||
`ideavimsupport` `ideavimsupport` List of strings (default "dialog")
|
||||
|
||||
Define the list of additional buffers where IdeaVim is enabled.
|
||||
|
||||
- dialog - enable IdeaVim in dialogs
|
||||
- singleline - enable IdeaVim in single line editors (not suggested)
|
||||
|
||||
----------
|
||||
[1] - cursor keys, <End>, <Home>, <PageUp> and <PageDown>
|
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
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
2
gradlew
vendored
2
gradlew
vendored
@@ -130,7 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
21
gradlew.bat
vendored
21
gradlew.bat
vendored
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
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_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
@@ -64,21 +64,6 @@ echo location of your Java installation.
|
||||
|
||||
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
|
||||
@rem Setup the command line
|
||||
|
||||
@@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@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.MotionRightTillMatchCharAction" mappingModes="NXO" keys="t"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionHomeAction" mappingModes="NV" keys="«Home»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftHomeAction" mappingModes="NV" keys="«S-Home»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.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.MotionShiftEndAction" mappingModes="NV" keys="«S-End»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftEndAction" mappingModes="INV" keys="«S-End»"/>
|
||||
<!-- Up/Down -->
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" mappingModes="NXO" keys="j"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionDownCtrlNAction" mappingModes="NXO" keys="«C-N»"/>
|
||||
@@ -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.MotionScrollHalfWidthLeftAction" mappingModes="NXO" keys="zL"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfWidthRightAction" mappingModes="NXO" keys="zH"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftDownAction" mappingModes="NV" keys="«S-Down»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.updown.MotionShiftUpAction" mappingModes="NV" keys="«S-Up»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftRightAction" mappingModes="NV" keys="«S-Right»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.leftright.MotionShiftLeftAction" mappingModes="NV" keys="«S-Left»"/>
|
||||
<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="INV" keys="«S-Up»"/>
|
||||
<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="INV" keys="«S-Left»"/>
|
||||
<!-- Visual -->
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" mappingModes="X" keys="«Esc»,«C-[»,«C-C»"/>
|
||||
<vimAction implementation="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" mappingModes="NX" keys="v"/>
|
||||
|
@@ -80,5 +80,28 @@
|
||||
<alias name="vim-highlightedyank"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.nerdtree.NerdTree" name="NERDTree">
|
||||
<aliases>
|
||||
<alias name="https://github.com/preservim/nerdtree"/>
|
||||
<alias name="preservim/nerdtree"/>
|
||||
<alias name="https://github.com/scrooloose/nerdtree"/>
|
||||
<alias name="scrooloose/nerdtree"/>
|
||||
<alias name="nerdtree"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
</extensions>
|
||||
|
||||
<!-- IdeaVim extensions-->
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<projectService serviceImplementation="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$NerdDispatcher"/>
|
||||
</extensions>
|
||||
<projectListeners>
|
||||
<listener class="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$ProjectViewListener"
|
||||
topic="com.intellij.openapi.wm.ex.ToolWindowManagerListener"/>
|
||||
</projectListeners>
|
||||
<applicationListeners>
|
||||
<listener class="com.maddyhome.idea.vim.extension.nerdtree.NerdTree$NerdProjectListener"
|
||||
topic="com.intellij.openapi.project.ProjectManagerListener"/>
|
||||
</applicationListeners>
|
||||
</idea-plugin>
|
||||
|
@@ -4,61 +4,21 @@
|
||||
<change-notes><![CDATA[
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Support <code>unmap</code> and <code>mapclear</code> commands
|
||||
<a href="https://youtrack.jetbrains.com/issue/VIM-1491">VIM-1491</a>
|
||||
</li>
|
||||
<li>Support mappings in ex panel (<code>cmap</code>)
|
||||
<a href="https://youtrack.jetbrains.com/issue/VIM-1227">VIM-1227</a>
|
||||
</li>
|
||||
<li>Support <code>NERDTree</code> extension <a href="https://youtrack.jetbrains.com/issue/VIM-1042">VIM-1042</a> | <a
|
||||
href="https://github.com/preservim/nerdtree">NERDTree</a></li>
|
||||
<li>Support <code>maxmapdepth</code> option to define the maximum depth of mappings</li>
|
||||
</ul>
|
||||
|
||||
<h3>Fixes:</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://youtrack.jetbrains.com/issue/VIM-2113">VIM-2113</a>
|
||||
Fix <code>cit</code> for empty tags
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://youtrack.jetbrains.com/issue/VIM-2114">VIM-2114</a>
|
||||
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>
|
||||
<li><a href="https://youtrack.jetbrains.com/issue/VIM-2202">VIM-2202</a> Fix macro recording for ex command and search
|
||||
</li>
|
||||
<li><a href="https://youtrack.jetbrains.com/issue/VIM-1799">VIM-1799</a>
|
||||
<a href="https://youtrack.jetbrains.com/issue/VIM-179a">VIM-1794</a>
|
||||
Special characters are not interpreted on yanking
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
<description><![CDATA[
|
||||
<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 -->
|
||||
<!-- 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 -->
|
||||
<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.ShowCmdStatusBarWidgetFactory" order="first"/>
|
||||
|
||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.config.VimLocalConfig"/>
|
||||
<applicationService serviceImplementation="com.maddyhome.idea.vim.VimPlugin"/>
|
||||
|
||||
<!-- Initialise as early as possible so that we're ready to edit quickly. This is especially important for Rider,
|
||||
@@ -120,6 +79,8 @@
|
||||
<postStartupActivity implementation="com.maddyhome.idea.vim.PluginStartup" order="first"/>
|
||||
|
||||
<editorFloatingToolbarProvider implementation="com.maddyhome.idea.vim.ui.ReloadFloatingToolbar"/>
|
||||
|
||||
<actionPromoter implementation="com.maddyhome.idea.vim.key.VimActionsPromoter" order="last"/>
|
||||
</extensions>
|
||||
|
||||
<xi:include href="/META-INF/includes/ApplicationServices.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# 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
|
||||
# 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}
|
||||
action.eap.choice.active.text=EAP{0, choice, 0# (Active)|1#}
|
||||
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.create.issue.text=Create an Issue
|
||||
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
|
||||
border.title.shortcut.conflicts.for.active.keymap=Shortcut Conflicts for Active Keymap
|
||||
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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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.Editor;
|
||||
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.TypedActionHandler;
|
||||
import com.intellij.openapi.editor.event.*;
|
||||
@@ -140,6 +139,6 @@ public class EventFacade {
|
||||
}
|
||||
|
||||
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
|
||||
* 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
|
||||
* 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.RegisterGroup;
|
||||
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.helper.*;
|
||||
import com.maddyhome.idea.vim.key.*;
|
||||
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.ex.ExEntryPanel;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -162,7 +163,7 @@ public class KeyHandler {
|
||||
* @param context The data 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,
|
||||
@NotNull KeyStroke key,
|
||||
@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();
|
||||
// All the editor actions should be performed with top level editor!!!
|
||||
// Be careful: all the EditorActionHandler implementation should correctly process InjectedEditors
|
||||
@@ -207,7 +223,7 @@ public class KeyHandler {
|
||||
handleKeyRecursionCount++;
|
||||
|
||||
try {
|
||||
if (!allowKeyMappings || !handleKeyMapping(editor, key, context)) {
|
||||
if (!allowKeyMappings || !handleKeyMapping(editor, key, context, mappingCompleted)) {
|
||||
if (isCommandCountKey(chKey, editorState)) {
|
||||
commandBuilder.addCountCharacter(key);
|
||||
} else if (isDeleteCommandCountKey(key, editorState)) {
|
||||
@@ -229,13 +245,13 @@ public class KeyHandler {
|
||||
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,
|
||||
// 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) {
|
||||
handleCommandNode(editor, context, key, (CommandNode) node, editorState);
|
||||
handleCommandNode(editor, context, key, (CommandNode<ActionBeanClass>) node, editorState);
|
||||
commandBuilder.addKey(key);
|
||||
} else if (node instanceof CommandPartNode) {
|
||||
commandBuilder.setCurrentCommandPartNode((CommandPartNode) node);
|
||||
commandBuilder.setCurrentCommandPartNode((CommandPartNode<ActionBeanClass>) node);
|
||||
commandBuilder.addKey(key);
|
||||
} else if (isSelectRegister(key, editorState)) {
|
||||
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}
|
||||
*/
|
||||
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)) {
|
||||
return editorState.getCommandBuilder().getChildNode(KeyStroke.getKeyStroke('_'));
|
||||
}
|
||||
@@ -319,12 +335,13 @@ public class KeyHandler {
|
||||
}
|
||||
}
|
||||
reset(editor);
|
||||
ChangeGroup.resetCaret(editor, VimPlugin.getEditor().isBarCursor());
|
||||
ChangeGroup.resetCaret(editor, false);
|
||||
}
|
||||
|
||||
private boolean handleKeyMapping(final @NotNull Editor editor,
|
||||
final @NotNull KeyStroke key,
|
||||
final @NotNull DataContext context) {
|
||||
final @NotNull DataContext context,
|
||||
boolean mappingCompleted) {
|
||||
|
||||
final CommandState commandState = CommandState.getInstance(editor);
|
||||
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
|
||||
// be processed as normal.
|
||||
return handleUnfinishedMappingSequence(editor, mappingState, mapping)
|
||||
|| handleCompleteMappingSequence(editor, context, commandState, mappingState, mapping, key)
|
||||
return (handleUnfinishedMappingSequence(editor, mappingState, mapping, mappingCompleted))
|
||||
|| handleCompleteMappingSequence(editor, context, mappingState, mapping, key)
|
||||
|| handleAbandonedMappingSequence(editor, mappingState, context);
|
||||
}
|
||||
|
||||
@@ -360,7 +377,10 @@ public class KeyHandler {
|
||||
|
||||
private boolean handleUnfinishedMappingSequence(@NotNull Editor editor,
|
||||
@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,
|
||||
// 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.
|
||||
@@ -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
|
||||
// delete a word)
|
||||
final Application application = ApplicationManager.getApplication();
|
||||
if (!application.isUnitTestMode() && OptionsManager.INSTANCE.getTimeout().isSet()) {
|
||||
if (OptionsManager.INSTANCE.getTimeout().isSet()) {
|
||||
mappingState.startMappingTimer(actionEvent -> application.invokeLater(() -> {
|
||||
|
||||
final List<KeyStroke> unhandledKeys = mappingState.detachKeys();
|
||||
|
||||
// TODO: I'm not sure why we abandon plugin commands here
|
||||
// Would be useful to have a comment or a helpfully named helper method here
|
||||
if (editor.isDisposed() || unhandledKeys.get(0).equals(StringHelper.PlugKeyStroke)) {
|
||||
if (editor.isDisposed() || isPluginMapping(unhandledKeys)) {
|
||||
return;
|
||||
}
|
||||
|
||||
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())));
|
||||
}
|
||||
@@ -397,7 +415,6 @@ public class KeyHandler {
|
||||
|
||||
private boolean handleCompleteMappingSequence(@NotNull Editor editor,
|
||||
@NotNull DataContext context,
|
||||
@NotNull CommandState commandState,
|
||||
@NotNull MappingState mappingState,
|
||||
@NotNull KeyMapping mapping,
|
||||
KeyStroke key) {
|
||||
@@ -430,13 +447,13 @@ public class KeyHandler {
|
||||
|
||||
mappingState.resetMappingSequence();
|
||||
|
||||
final EditorDataContext currentContext = new EditorDataContext(editor, context);
|
||||
final EditorDataContext currentContext = EditorDataContext.init(editor, context);
|
||||
|
||||
mappingInfo.execute(editor, context);
|
||||
|
||||
// If we've just evaluated the previous key sequence, make sure to also handle the current key
|
||||
if (mappingInfo != currentMappingInfo) {
|
||||
handleKey(editor, key, currentContext, true);
|
||||
handleKey(editor, key, currentContext, true, false);
|
||||
}
|
||||
|
||||
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.
|
||||
// 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)
|
||||
//
|
||||
// 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)) {
|
||||
handleKey(editor, unhandledKeyStrokes.get(unhandledKeyStrokes.size() - 1), context, true);
|
||||
if (isPluginMapping(unhandledKeyStrokes)) {
|
||||
handleKey(editor, unhandledKeyStrokes.get(unhandledKeyStrokes.size() - 1), context, true, false);
|
||||
} else {
|
||||
handleKey(editor, unhandledKeyStrokes.get(0), context, false);
|
||||
handleKey(editor, unhandledKeyStrokes.get(0), context, false, false);
|
||||
|
||||
for (KeyStroke keyStroke : unhandledKeyStrokes.subList(1, unhandledKeyStrokes.size())) {
|
||||
handleKey(editor, keyStroke, context, true);
|
||||
handleKey(editor, keyStroke, context, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
private boolean isCommandCountKey(char chKey, @NotNull CommandState editorState) {
|
||||
// Make sure to avoid handling '0' as the start of a count.
|
||||
@@ -689,10 +709,10 @@ public class KeyHandler {
|
||||
private void handleCommandNode(Editor editor,
|
||||
DataContext context,
|
||||
KeyStroke key,
|
||||
@NotNull CommandNode node,
|
||||
@NotNull CommandNode<ActionBeanClass> node,
|
||||
CommandState editorState) {
|
||||
// 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 Argument.Type expectedArgumentType = commandBuilder.getExpectedArgumentType();
|
||||
|
||||
@@ -738,8 +758,8 @@ public class KeyHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean stopMacroRecord(CommandNode node, @NotNull CommandState editorState) {
|
||||
return editorState.isRecording() && node.getActionHolder().getAction() instanceof ToggleRecordingAction;
|
||||
private boolean stopMacroRecord(CommandNode<ActionBeanClass> node, @NotNull CommandState editorState) {
|
||||
return editorState.isRecording() && node.getActionHolder().getInstance() instanceof ToggleRecordingAction;
|
||||
}
|
||||
|
||||
private void startWaitingForArgument(Editor editor,
|
||||
@@ -801,7 +821,7 @@ public class KeyHandler {
|
||||
*
|
||||
* @param editor The editor to reset.
|
||||
*/
|
||||
public void partialReset(@Nullable Editor editor) {
|
||||
public void partialReset(@NotNull Editor editor) {
|
||||
CommandState editorState = CommandState.getInstance(editor);
|
||||
editorState.getMappingState().resetMappingSequence();
|
||||
editorState.getCommandBuilder().resetInProgressCommandPart(getKeyRoot(editorState.getMappingState().getMappingMode()));
|
||||
@@ -812,13 +832,13 @@ public class KeyHandler {
|
||||
*
|
||||
* @param editor The editor to reset.
|
||||
*/
|
||||
public void reset(@Nullable Editor editor) {
|
||||
public void reset(@NotNull Editor editor) {
|
||||
partialReset(editor);
|
||||
CommandState editorState = CommandState.getInstance(editor);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -828,7 +848,7 @@ public class KeyHandler {
|
||||
*
|
||||
* @param editor The editor to reset.
|
||||
*/
|
||||
public void fullReset(@Nullable Editor editor) {
|
||||
public void fullReset(@NotNull Editor editor) {
|
||||
VimPlugin.clearError();
|
||||
CommandState.getInstance(editor).reset();
|
||||
reset(editor);
|
||||
@@ -836,10 +856,8 @@ public class KeyHandler {
|
||||
if (registerGroup != null) {
|
||||
registerGroup.resetRegister();
|
||||
}
|
||||
if (editor != null) {
|
||||
VisualGroupKt.updateCaretState(editor);
|
||||
editor.getSelectionModel().removeSelection();
|
||||
}
|
||||
VisualGroupKt.updateCaretState(editor);
|
||||
editor.getSelectionModel().removeSelection();
|
||||
}
|
||||
|
||||
// This method is copied from com.intellij.openapi.editor.actionSystem.EditorAction.getProjectAwareDataContext
|
||||
@@ -934,6 +952,7 @@ public class KeyHandler {
|
||||
if (editorState.getSubMode() == CommandState.SubMode.SINGLE_COMMAND &&
|
||||
(!cmd.getFlags().contains(CommandFlags.FLAG_EXPECT_MORE))) {
|
||||
editorState.popModes();
|
||||
VisualGroupKt.resetShape(CommandStateHelper.getMode(editor), editor);
|
||||
}
|
||||
|
||||
if (editorState.getCommandBuilder().isDone()) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
*/
|
||||
class PluginStartup : StartupActivity.DumbAware {
|
||||
class PluginStartup : StartupActivity.DumbAware/*, LightEditCompatible*/ {
|
||||
|
||||
private var firstInitializationOccurred = false
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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) {
|
||||
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) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,7 +18,7 @@
|
||||
package com.maddyhome.idea.vim;
|
||||
|
||||
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.NotificationListener;
|
||||
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.wm.StatusBar;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.maddyhome.idea.vim.config.VimLocalConfig;
|
||||
import com.maddyhome.idea.vim.config.VimState;
|
||||
import com.maddyhome.idea.vim.config.migration.ApplicationConfigurationMigrator;
|
||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
||||
@@ -53,10 +52,10 @@ import com.maddyhome.idea.vim.group.visual.VisualMotionGroup;
|
||||
import com.maddyhome.idea.vim.helper.MacKeyRepeat;
|
||||
import com.maddyhome.idea.vim.listener.VimListenerManager;
|
||||
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.VimEmulationConfigurable;
|
||||
import com.maddyhome.idea.vim.ui.VimRcFileState;
|
||||
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -105,11 +104,6 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
public void initialize() {
|
||||
LOG.debug("initComponent");
|
||||
|
||||
// Initialize a legacy local config.
|
||||
if (previousStateVersion == 5) {
|
||||
//noinspection deprecation
|
||||
VimLocalConfig.Companion.initialize();
|
||||
}
|
||||
if (enabled) {
|
||||
Application application = ApplicationManager.getApplication();
|
||||
if (application.isUnitTestMode()) {
|
||||
@@ -168,7 +162,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
}
|
||||
|
||||
public static @Nullable RegisterGroup getRegisterIfCreated() {
|
||||
return ServiceManager.getServiceIfCreated(RegisterGroup.class);
|
||||
return ApplicationManager.getApplication().getServiceIfCreated(RegisterGroup.class);
|
||||
}
|
||||
|
||||
public static @NotNull FileGroup getFile() {
|
||||
@@ -180,7 +174,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
}
|
||||
|
||||
public static @Nullable SearchGroup getSearchIfCreated() {
|
||||
return ServiceManager.getServiceIfCreated(SearchGroup.class);
|
||||
return ApplicationManager.getApplication().getServiceIfCreated(SearchGroup.class);
|
||||
}
|
||||
|
||||
public static @NotNull ProcessGroup getProcess() {
|
||||
@@ -204,7 +198,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
}
|
||||
|
||||
public static @Nullable KeyGroup getKeyIfCreated() {
|
||||
return ServiceManager.getServiceIfCreated(KeyGroup.class);
|
||||
return ApplicationManager.getApplication().getServiceIfCreated(KeyGroup.class);
|
||||
}
|
||||
|
||||
public static @NotNull WindowGroup getWindow() {
|
||||
@@ -216,7 +210,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
}
|
||||
|
||||
public static @Nullable EditorGroup getEditorIfCreated() {
|
||||
return ServiceManager.getServiceIfCreated(EditorGroup.class);
|
||||
return ApplicationManager.getApplication().getServiceIfCreated(EditorGroup.class);
|
||||
}
|
||||
|
||||
public static @NotNull VisualMotionGroup getVisualMotion() {
|
||||
@@ -242,7 +236,13 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
ideavimrcRegistered = true;
|
||||
|
||||
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() {
|
||||
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(getPluginId());
|
||||
final IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(getPluginId());
|
||||
if (!ApplicationManager.getApplication().isInternal()) {
|
||||
return plugin != null ? plugin.getVersion() : "SNAPSHOT";
|
||||
}
|
||||
@@ -357,7 +357,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
RegisterActions.registerActions();
|
||||
|
||||
// Register ex handlers
|
||||
CommandParser.getInstance().registerHandlers();
|
||||
CommandParser.INSTANCE.registerHandlers();
|
||||
|
||||
// Register extensions
|
||||
VimExtensionRegistrar.registerExtensions();
|
||||
@@ -365,14 +365,15 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
// Execute ~/.ideavimrc
|
||||
registerIdeavimrc();
|
||||
|
||||
// Initialize extensions
|
||||
VimExtensionRegistrar.enableDelayedExtensions();
|
||||
|
||||
// Turing on should be performed after all commands registration
|
||||
getSearch().turnOn();
|
||||
VimListenerManager.INSTANCE.turnOn();
|
||||
}
|
||||
|
||||
private void turnOffPlugin() {
|
||||
KeyHandler.getInstance().fullReset(null);
|
||||
|
||||
SearchGroup searchGroup = getSearchIfCreated();
|
||||
if (searchGroup != null) {
|
||||
searchGroup.turnOff();
|
||||
@@ -384,7 +385,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
RegisterActions.unregisterActions();
|
||||
|
||||
// Unregister ex handlers
|
||||
CommandParser.getInstance().unregisterHandlers();
|
||||
CommandParser.INSTANCE.unregisterHandlers();
|
||||
}
|
||||
|
||||
private boolean stateUpdated = false;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -61,7 +61,7 @@ class VimTypedActionHandler(origHandler: TypedActionHandler?) : TypedActionHandl
|
||||
try {
|
||||
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||
handler.handleKey(editor, keyStroke, EditorDataContext(editor, context))
|
||||
handler.handleKey(editor, keyStroke, EditorDataContext.init(editor, context))
|
||||
} catch (e: Throwable) {
|
||||
logger.error(e)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 setSelected(event: AnActionEvent, b: Boolean) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.isTemplateActive
|
||||
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.option.OptionsManager
|
||||
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.
|
||||
*/
|
||||
class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val editor = getEditor(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?
|
||||
try {
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor, e.dataContext))
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext.init(editor, e.dataContext))
|
||||
} catch (ignored: ProcessCanceledException) {
|
||||
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
||||
// 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 || keyCode == KeyEvent.VK_ENTER) && editor.appCodeTemplateCaptured()) return false
|
||||
|
||||
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
||||
if (keyCode == KeyEvent.VK_TAB) {
|
||||
VimPlugin.getChange().tabAction = true
|
||||
@@ -186,16 +189,67 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_END, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_PAGE_UP, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_PAGE_DOWN, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)).build()
|
||||
val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> =
|
||||
ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_TAB, 0))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_LEFT,
|
||||
0,
|
||||
InputEvent.CTRL_DOWN_MASK,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
)
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_RIGHT,
|
||||
0,
|
||||
InputEvent.CTRL_DOWN_MASK,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
)
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_HOME,
|
||||
0,
|
||||
InputEvent.CTRL_DOWN_MASK,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
)
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_END,
|
||||
0,
|
||||
InputEvent.CTRL_DOWN_MASK,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
)
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_PAGE_UP,
|
||||
0,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
)
|
||||
.addAll(
|
||||
getKeyStrokes(
|
||||
KeyEvent.VK_PAGE_DOWN,
|
||||
0,
|
||||
InputEvent.SHIFT_DOWN_MASK,
|
||||
InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK
|
||||
)
|
||||
).build()
|
||||
|
||||
private const val ACTION_ID = "VimShortcutKeyAction"
|
||||
|
||||
@@ -214,6 +268,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
VimPlugin.getChange().autoIndentRange(editor, caret, context, range.toVimTextRange(true))
|
||||
return true
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 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 argument != null &&
|
||||
VimPlugin.getChange()
|
||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_LOWER, argument)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val topLevelEditor = editor.getTopLevelEditor()
|
||||
return VimPlugin.getChange()
|
||||
.changeCaseRange(topLevelEditor, caret, range.toVimTextRange(false), CharacterHelper.CASE_LOWER)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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() {
|
||||
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().changeCaseToggleCharacter(editor, caret, count)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 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 argument != null &&
|
||||
VimPlugin.getChange()
|
||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_TOGGLE, argument)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
return VimPlugin.getChange()
|
||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_TOGGLE)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 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 argument != null &&
|
||||
VimPlugin.getChange()
|
||||
.changeCaseMotion(editor, caret, context, count, rawCount, CharacterHelper.CASE_UPPER, argument)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
return VimPlugin.getChange()
|
||||
.changeCaseRange(editor, caret, range.toVimTextRange(false), CharacterHelper.CASE_UPPER)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 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 argument != null && VimPlugin.getChange().changeCharacter(editor, caret, count, argument.character)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 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().changeEndOfLine(editor, caret, count)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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() {
|
||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
val range = LineRange(0, EditorHelper.getLineCount(editor) - 1)
|
||||
return VimPlugin.getSearch()
|
||||
.searchAndReplace(editor, editor.caretModel.primaryCaret, range, "s", "//~/&")
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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() {
|
||||
override val type: Command.Type = Command.Type.OTHER_SELF_SYNCHRONIZED
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
var result = true
|
||||
for (caret in editor.caretModel.allCarets) {
|
||||
val line = caret.logicalPosition.line
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 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 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
|
||||
* 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
|
||||
* 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 fun execute(editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
VimPlugin.getChange().changeReplace(editor, context)
|
||||
return true
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
return VimPlugin.getChange().changeRange(editor, caret, range.toVimTextRange(false), range.type, context)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val argument = cmd.argument
|
||||
return argument != null &&
|
||||
VimPlugin.getChange().changeCharacterRange(editor, range.toVimTextRange(false), argument.character)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val textRange = range.toVimTextRange(true)
|
||||
val lineRange = TextRange(EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
||||
EditorHelper.getLineEndForOffset(editor, textRange.endOffset) + 1)
|
||||
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, textRange.endOffset)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val vimTextRange = range.toVimTextRange(true)
|
||||
return if (range.type == SelectionType.BLOCK_WISE && vimTextRange.isMultiple) {
|
||||
val starts = vimTextRange.startOffsets
|
||||
@@ -59,8 +62,12 @@ class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
val blockRange = TextRange(starts, ends)
|
||||
VimPlugin.getChange().changeRange(editor, caret, blockRange, SelectionType.BLOCK_WISE, context)
|
||||
} else {
|
||||
val lineRange = TextRange(EditorHelper.getLineStartForOffset(editor, vimTextRange.startOffset),
|
||||
EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset) + 1)
|
||||
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 {
|
||||
val argument = cmd.argument ?: return false
|
||||
val range = MotionGroup
|
||||
.getMotionRange(editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount,
|
||||
argument)
|
||||
.getMotionRange(
|
||||
editor, editor.caretModel.primaryCaret, context, cmd.count, cmd.rawCount,
|
||||
argument
|
||||
)
|
||||
?: return false
|
||||
|
||||
val current = editor.caretModel.logicalPosition
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 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 argument != null &&
|
||||
VimPlugin.getChange().reformatCodeMotion(editor, caret, context, count, rawCount, argument)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
VimPlugin.getChange().reformatCodeSelection(editor, caret, range)
|
||||
return true
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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() {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||
|
||||
override fun executeAction(editor: Editor, caret: Caret, context: DataContext, cmd: Command, range: VimSelection): Boolean {
|
||||
return VimPlugin.getChange().changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
return VimPlugin.getChange()
|
||||
.changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.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 fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
return VimPlugin.getChange().deleteCharacter(editor, caret, 1, false)
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
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
|
||||
* 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
|
||||
* 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() {
|
||||
override val type: Command.Type = Command.Type.DELETE
|
||||
|
||||
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().deleteEndOfLine(editor, caret, count)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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() {
|
||||
override val type: Command.Type = Command.Type.DELETE
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
if (editor.isOneLineMode) return false
|
||||
if (ideajoin.isSet) {
|
||||
return VimPlugin.getChange().joinViaIdeaByCount(editor, context, count)
|
||||
}
|
||||
VimPlugin.getEditor().notifyIdeaJoin(editor.project)
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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 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 {
|
||||
if (argument == null) return false
|
||||
val (first, second) = VimPlugin.getChange()
|
||||
.getDeleteRangeAndType(editor, caret, context, count, rawCount, argument, false) ?: return false
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val selectionType = range.type
|
||||
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
|
||||
* 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
|
||||
* 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.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
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 fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection): Boolean {
|
||||
override fun executeAction(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
cmd: Command,
|
||||
range: VimSelection
|
||||
): Boolean {
|
||||
val textRange = range.toVimTextRange(false)
|
||||
val (usedCaret, usedRange, usedType) = when (range.type) {
|
||||
SelectionType.BLOCK_WISE -> Triple(editor.caretModel.primaryCaret, textRange, range.type)
|
||||
SelectionType.LINE_WISE -> Triple(caret, textRange, SelectionType.LINE_WISE)
|
||||
SelectionType.CHARACTER_WISE -> {
|
||||
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, textRange.endOffset)
|
||||
val endsWithNewLine = if (lineEndForOffset == editor.fileSize) 0 else 1
|
||||
val lineRange = TextRange(
|
||||
EditorHelper.getLineStartForOffset(editor, textRange.startOffset),
|
||||
EditorHelper.getLineEndForOffset(editor, textRange.endOffset) + 1
|
||||
lineEndForOffset + endsWithNewLine
|
||||
)
|
||||
Triple(caret, lineRange, SelectionType.LINE_WISE)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@@ -57,8 +58,9 @@ class DeleteVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
VimPlugin.getChange()
|
||||
.deleteRange(editor, editor.caretModel.primaryCaret, blockRange, SelectionType.BLOCK_WISE, false)
|
||||
} else {
|
||||
val lineRange = TextRange(EditorHelper.getLineStartForOffset(editor, vimTextRange.startOffset),
|
||||
EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset) + 1)
|
||||
val lineEndForOffset = EditorHelper.getLineEndForOffset(editor, vimTextRange.endOffset)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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