mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 07:31:47 +02:00
Compare commits
59 Commits
0.60.1-EAP
...
0.60.3-EAP
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cdf7fd8ce6 | ||
![]() |
8fe07e7b20 | ||
![]() |
b800237606 | ||
![]() |
fed02e5b8a | ||
![]() |
2d4d3e9410 | ||
![]() |
880d4c6888 | ||
![]() |
6a3d606032 | ||
![]() |
612a86c4d9 | ||
![]() |
14abc25c01 | ||
![]() |
52673d1a02 | ||
![]() |
b7caee119e | ||
![]() |
a148446912 | ||
![]() |
1ee9075976 | ||
![]() |
b03627a110 | ||
![]() |
04ac0ab743 | ||
![]() |
e7aa985ad5 | ||
![]() |
4177f4e4f3 | ||
![]() |
c1e415b76a | ||
![]() |
8ae656dee3 | ||
![]() |
d48576f48a | ||
![]() |
c0c5075072 | ||
![]() |
59d106b8c4 | ||
![]() |
d96c313ecb | ||
![]() |
212c708150 | ||
![]() |
3739eb173e | ||
![]() |
0d3ecce8a2 | ||
![]() |
164d7a4200 | ||
![]() |
1258e602e6 | ||
![]() |
8a5ad713ea | ||
![]() |
12be65fa09 | ||
![]() |
0720431c91 | ||
![]() |
6f1ac1de97 | ||
![]() |
99d2d4b594 | ||
![]() |
2bf9b97e49 | ||
![]() |
c6600f3348 | ||
![]() |
e29ab54b0e | ||
![]() |
197565d4cb | ||
![]() |
3d570d2020 | ||
![]() |
fe364dc6dc | ||
![]() |
5d0e82781f | ||
![]() |
24f005a340 | ||
![]() |
1743c08091 | ||
![]() |
81b095c899 | ||
![]() |
965e8f71a0 | ||
![]() |
efc789fbf4 | ||
![]() |
f9cf49a9dd | ||
![]() |
0b41bd30cd | ||
![]() |
7c79615c6a | ||
![]() |
10be7354cd | ||
![]() |
1e9925f092 | ||
![]() |
838079b249 | ||
![]() |
a9bf5c93df | ||
![]() |
d4ec7e1f69 | ||
![]() |
12e9774d4c | ||
![]() |
7bccaa8717 | ||
![]() |
319874b973 | ||
![]() |
daf8799c39 | ||
![]() |
f45d4e1451 | ||
![]() |
7458d126bc |
146
.detekt/baseline.xml
Normal file
146
.detekt/baseline.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues>
|
||||
<ID>ComplexMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
||||
</ManuallySuppressedIssues>
|
||||
<CurrentIssues>
|
||||
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ComplexMethod:SearchHelperKt.kt$// bounds are considered inside corresponding quotes fun checkInString(chars: CharSequence, currentPos: Int, str: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ComplexMethod:VimExchangeExtension.kt$VimExchangeExtension.Operator$private fun compareExchanges(x: Exchange, y: Exchange): ExchangeCompareResult</ID>
|
||||
<ID>ComplexMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ComplexMethod:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>LongMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>MagicNumber:ActionListHandler.kt$ActionListHandler$50</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$3</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$6</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$7</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$20</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$7</ID>
|
||||
<ID>MagicNumber:BufferListHandler.kt$3</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$11</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$999999999</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$6</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
||||
<ID>MagicNumber:EditorHelper.kt$10</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
||||
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$200</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$3</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$5</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$200</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$3</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$5</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$100</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$1000</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
||||
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
||||
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
||||
<ID>MagicNumber:SearchHelperKt.kt$3</ID>
|
||||
<ID>MagicNumber:SelectLastFileHandler.kt$SelectLastFileHandler$999</ID>
|
||||
<ID>MagicNumber:SelectionType.kt$SelectionType.BLOCK_WISE$3</ID>
|
||||
<ID>MagicNumber:ShiftLeftHandler.kt$ShiftLeftHandler$31</ID>
|
||||
<ID>MagicNumber:ShiftRightHandler.kt$ShiftRightHandler$31</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
||||
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
||||
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger<ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: $pluginId")</ID>
|
||||
<ID>MaxLineLength:ExRanges.kt$SearchRange$override</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set clipboard+=ideaput", "ideaput") { OptionsManager.clipboard.append(ClipboardOptionsData.ideaput) })</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$private inner</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$val successNotification = Notification(IDEAVIM_NOTIFICATION_ID, IDEAVIM_NOTIFICATION_TITLE, "<code>$optionName</code> is enabled", NotificationType.INFORMATION)</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$private</ID>
|
||||
<ID>MaxLineLength:PutLinesHandler.kt$PutLinesHandler$val textData = registerGroup.lastRegister?.let { PutData.TextData(it.text ?: StringHelper.toKeyNotation(it.keys), SelectionType.LINE_WISE, it.transferableData) }</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBaseAction$val textData = if (lastRegister != null) TextData(lastRegister.text ?: StringHelper.toKeyNotation(lastRegister.keys), lastRegister.type, lastRegister.transferableData) else null</ID>
|
||||
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Operator$val visualSelection = PutData.VisualSelection(mapOf(editor.caretModel.primaryCaret to VimSelection.create(range.startOffset, range.endOffset - 1, selectionType, editor)), selectionType)</ID>
|
||||
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&build=$buildNumber&pluginVersion=$version&os=$os&uuid=$uid"</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$@JvmField val VIM_ONLY_EDITOR_KEYS: Set<KeyStroke> = ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_END, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_UP, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_PAGE_DOWN, 0, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)).build()</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$ImmutableSet.builder<KeyStroke>().addAll(getKeyStrokes(KeyEvent.VK_ENTER, 0)).addAll(getKeyStrokes(KeyEvent.VK_ESCAPE, 0)) .addAll(getKeyStrokes(KeyEvent.VK_TAB, 0)).addAll(getKeyStrokes(KeyEvent.VK_BACK_SPACE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_INSERT, 0)).addAll(getKeyStrokes(KeyEvent.VK_DELETE, 0, InputEvent.CTRL_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_UP, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)).addAll(getKeyStrokes(KeyEvent.VK_DOWN, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_LEFT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_RIGHT, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK)) .addAll(getKeyStrokes(KeyEvent.VK_HOME, 0, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK or InputEvent.SHIFT_DOWN_MASK))</ID>
|
||||
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList<Range> = mutableListOf()</ID>
|
||||
<ID>NestedBlockDepth:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:ActionBeanClass.kt$ActionBeanClass$fun getParsedModes(): Set<MappingMode>?</ID>
|
||||
<ID>ReturnCount:Alias.kt$Alias$fun getCommand(input: String, count: Int): String</ID>
|
||||
<ID>ReturnCount:CmdFilterHandler.kt$CmdFilterHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:CommandGroup.kt$CommandGroup$fun isAlias(command: String): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesAction.kt$DeleteJoinLinesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinLinesSpacesAction.kt$DeleteJoinLinesSpacesAction$override fun execute(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesAction.kt$DeleteJoinVisualLinesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteJoinVisualLinesSpacesAction.kt$DeleteJoinVisualLinesSpacesAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:DeleteMotionAction.kt$DeleteMotionAction$override fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>ReturnCount:EditFileHandler.kt$EditFileHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:EditorHelper.kt$ fun Editor.isPrimaryEditor(): Boolean</ID>
|
||||
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array<Range>?</ID>
|
||||
<ID>ReturnCount:FilterMotionAction.kt$FilterMotionAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:GotoCharacterHandler.kt$GotoCharacterHandler$override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:Helper.kt$@Suppress("IncorrectParentDisposable") fun Editor.isTemplateActive(): Boolean</ID>
|
||||
<ID>ReturnCount:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:IdeaSelectionControl.kt$IdeaSelectionControl$ fun predictMode(editor: Editor, selectionSource: VimListenerManager.SelectionSource): CommandState.Mode</ID>
|
||||
<ID>ReturnCount:MapHandler.kt$MapHandler$@Throws(ExException::class) private fun executeCommand(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ReturnCount:Marks.kt$IntellijMark$private fun getProject(): Project?</ID>
|
||||
<ID>ReturnCount:Marks.kt$VimMark.Companion$@JvmStatic fun create(key: Char?, logicalLine: Int?, col: Int?, filename: String?, protocol: String?): VimMark?</ID>
|
||||
<ID>ReturnCount:ModalEntry.kt$ModalEntry.<no name provided>$override fun dispatchKeyEvent(e: KeyEvent): Boolean</ID>
|
||||
<ID>ReturnCount:MotionScrollLastScreenLinePageStartAction.kt$MotionScrollLastScreenLinePageStartAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OperatorAction.kt$OperatorAction$override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun getProviderForPasteViaIde(context: DataContext, typeInRegister: SelectionType, data: PutData): PasteProvider?</ID>
|
||||
<ID>ReturnCount:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ReturnCount:PutLinesHandler.kt$PutLinesHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:ReloadVimRc.kt$VimRcFileState$fun equalTo(document: Document): Boolean</ID>
|
||||
<ID>ReturnCount:RepeatHandler.kt$RepeatHandler$@Throws(ExException::class) override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ReturnCount:SelectMotionRightAction.kt$SelectMotionRightAction$override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int</ID>
|
||||
<ID>ReturnCount:ShowCmd.kt$ShowCmd$fun getFullText(editor: Editor?): String</ID>
|
||||
<ID>ReturnCount:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ReturnCount:TextObjectActionHandler.kt$TextObjectActionHandler$ final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun redo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:UndoRedoHelper.kt$UndoRedoHelper$fun undo(context: DataContext): Boolean</ID>
|
||||
<ID>ReturnCount:VimExchangeExtension.kt$VimExchangeExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic fun inputString(editor: Editor, prompt: String, finishOn: Char?): String</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.SkipOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$@Throws(ExException::class) fun evaluate(expression: String, globals: Map<String?, Any?>): Any</ID>
|
||||
<ID>ReturnCount:VimScriptParser.kt$VimScriptParser$fun findOrCreateIdeaVimRc(): File?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun getKeyStroke(e: AnActionEvent): KeyStroke?</ID>
|
||||
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler$override fun execute(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ReturnCount:VimSurroundExtension.kt$VimSurroundExtension.Operator$override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockAppendAction.kt$VisualBlockAppendAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualBlockInsertAction.kt$VisualBlockInsertAction$override fun executeForAllCarets(editor: Editor, context: DataContext, cmd: Command, caretsAndSelections: Map<Caret, VimSelection>): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$ fun toggleVisual(editor: Editor, count: Int, rawCount: Int, subMode: CommandState.SubMode): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun autodetectVisualSubmode(editor: Editor): CommandState.SubMode</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun selectPreviousVisualMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$fun swapVisualSelections(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
|
||||
<ID>ReturnCount:VisualOperatorActionHandler.kt$VisualOperatorActionHandler$final override fun baseExecute(editor: Editor, caret: Caret, context: DataContext, cmd: Command): Boolean</ID>
|
||||
<ID>ReturnCount:YankGroup.kt$YankGroup$ fun yankMotion(editor: Editor, context: DataContext, count: Int, rawCount: Int, argument: Argument): Boolean</ID>
|
||||
<ID>ThrowsCount:CommandHandler.kt$CommandHandler$private fun checkArgs(cmd: ExCommand)</ID>
|
||||
<ID>TooManyFunctions:CommandBuilder.kt$CommandBuilder</ID>
|
||||
<ID>TooManyFunctions:CommandState.kt$CommandState</ID>
|
||||
<ID>TooManyFunctions:PutGroup.kt$PutGroup</ID>
|
||||
<ID>TooManyFunctions:Ranges.kt$Ranges</ID>
|
||||
<ID>TooManyFunctions:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
|
||||
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
@@ -11,6 +11,8 @@ complexity:
|
||||
threshold: 6
|
||||
ComplexCondition:
|
||||
threshold: 6
|
||||
ComplexMethod:
|
||||
threshold: 20
|
||||
exceptions:
|
||||
TooGenericExceptionCaught:
|
||||
active: false
|
||||
@@ -23,3 +25,7 @@ performance:
|
||||
style:
|
||||
ForbiddenComment:
|
||||
active: false
|
||||
MaxLineLength:
|
||||
maxLineLength: 160
|
||||
ReturnCount:
|
||||
max: 5
|
24
.run/IdeaVim full verification.run.xml
Normal file
24
.run/IdeaVim full verification.run.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim full verification" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="check" />
|
||||
<option value="runPluginVerifier" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
23
.run/IdeaVim tests.run.xml
Normal file
23
.run/IdeaVim tests.run.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IdeaVim tests" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="test" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
23
.run/Run IJ with IdeaVim.run.xml
Normal file
23
.run/Run IJ with IdeaVim.run.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Start IJ with IdeaVim" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="runIde" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
136
.teamcity/_Self/Project.kt
vendored
136
.teamcity/_Self/Project.kt
vendored
@@ -1,70 +1,86 @@
|
||||
package _Self
|
||||
|
||||
import _Self.buildTypes.*
|
||||
import _Self.vcsRoots.*
|
||||
import _Self.buildTypes.GitHubPullRequests
|
||||
import _Self.buildTypes.Nvim
|
||||
import _Self.buildTypes.PluginVerifier
|
||||
import _Self.buildTypes.Release
|
||||
import _Self.buildTypes.ReleaseEap
|
||||
import _Self.buildTypes.TestsForIntelliJ20181
|
||||
import _Self.buildTypes.TestsForIntelliJ20182
|
||||
import _Self.buildTypes.TestsForIntelliJ20183
|
||||
import _Self.buildTypes.TestsForIntelliJ20191
|
||||
import _Self.buildTypes.TestsForIntelliJ20192
|
||||
import _Self.buildTypes.TestsForIntelliJ20193
|
||||
import _Self.buildTypes.TestsForIntelliJ20201
|
||||
import _Self.buildTypes.TestsForIntelliJ20202
|
||||
import _Self.buildTypes.TestsForIntelliJEAP
|
||||
import _Self.vcsRoots.Branch_181
|
||||
import _Self.vcsRoots.Branch_183
|
||||
import _Self.vcsRoots.Branch_191_193
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||
|
||||
object Project : Project({
|
||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||
|
||||
vcsRoot(Branch_183)
|
||||
vcsRoot(Branch_181)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
vcsRoot(Branch_191_193)
|
||||
vcsRoot(Branch_Nvim)
|
||||
vcsRoot(Branch_183)
|
||||
vcsRoot(Branch_181)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
vcsRoot(Branch_191_193)
|
||||
|
||||
buildType(GitHubPullRequests)
|
||||
buildType(Release)
|
||||
buildType(TestsForIntelliJ20201)
|
||||
buildType(TestsForIntelliJ20191)
|
||||
buildType(TestsForIntelliJ20181)
|
||||
buildType(TestsForIntelliJ20192)
|
||||
buildType(TestsForIntelliJ20182)
|
||||
buildType(TestsForIntelliJ20193)
|
||||
buildType(TestsForIntelliJ20183)
|
||||
// buildType(Nvim)
|
||||
buildType(ReleaseEap)
|
||||
buildType(TestsForIntelliJ20202)
|
||||
buildType(TestsForIntelliJEAP)
|
||||
buildType(GitHubPullRequests)
|
||||
buildType(Release)
|
||||
buildType(TestsForIntelliJ20201)
|
||||
buildType(TestsForIntelliJ20191)
|
||||
buildType(TestsForIntelliJ20181)
|
||||
buildType(TestsForIntelliJ20192)
|
||||
buildType(TestsForIntelliJ20182)
|
||||
buildType(TestsForIntelliJ20193)
|
||||
buildType(TestsForIntelliJ20183)
|
||||
buildType(Nvim)
|
||||
buildType(ReleaseEap)
|
||||
buildType(TestsForIntelliJ20202)
|
||||
buildType(TestsForIntelliJEAP)
|
||||
buildType(PluginVerifier)
|
||||
|
||||
features {
|
||||
feature {
|
||||
id = "PROJECT_EXT_768"
|
||||
type = "CloudImage"
|
||||
param("use-spot-instances", "true")
|
||||
param("user-tags", "project=idea-vim")
|
||||
param("agent_pool_id", "41")
|
||||
param("image-instances-limit", "")
|
||||
param("subnet-id", "subnet-58839511")
|
||||
param("ebs-optimized", "false")
|
||||
param("instance-type", "c5d.large")
|
||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||
param("spot-instance-price", "0.1")
|
||||
param("source-id", "BuildAgentsIdeaVim")
|
||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||
param("key-pair-name", "teamcity-prod-pub")
|
||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||
param("profileId", "amazon-48")
|
||||
}
|
||||
feature {
|
||||
id = "amazon-48"
|
||||
type = "CloudProfile"
|
||||
param("profileServerUrl", "")
|
||||
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||
param("system.cloud.profile_id", "amazon-48")
|
||||
param("total-work-time", "")
|
||||
param("description", "")
|
||||
param("cloud-code", "amazon")
|
||||
param("enabled", "true")
|
||||
param("max-running-instances", "10")
|
||||
param("agentPushPreset", "")
|
||||
param("profileId", "amazon-48")
|
||||
param("name", "Cloud Agents")
|
||||
param("next-hour", "")
|
||||
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||
param("region", "eu-west-1")
|
||||
param("terminate-idle-time", "15")
|
||||
param("not-checked", "")
|
||||
}
|
||||
features {
|
||||
feature {
|
||||
id = "PROJECT_EXT_768"
|
||||
type = "CloudImage"
|
||||
param("use-spot-instances", "true")
|
||||
param("user-tags", "project=idea-vim")
|
||||
param("agent_pool_id", "41")
|
||||
param("image-instances-limit", "")
|
||||
param("subnet-id", "subnet-58839511")
|
||||
param("ebs-optimized", "false")
|
||||
param("instance-type", "c5d.large")
|
||||
param("amazon-id", "ami-0d1a6a32faa92923e")
|
||||
param("spot-instance-price", "0.1")
|
||||
param("source-id", "BuildAgentsIdeaVim")
|
||||
param("image-name-prefix", "BuildAgentsIdeaVim")
|
||||
param("key-pair-name", "teamcity-prod-pub")
|
||||
param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
|
||||
param("profileId", "amazon-48")
|
||||
}
|
||||
feature {
|
||||
id = "amazon-48"
|
||||
type = "CloudProfile"
|
||||
param("profileServerUrl", "")
|
||||
param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
|
||||
param("system.cloud.profile_id", "amazon-48")
|
||||
param("total-work-time", "")
|
||||
param("description", "")
|
||||
param("cloud-code", "amazon")
|
||||
param("enabled", "true")
|
||||
param("max-running-instances", "10")
|
||||
param("agentPushPreset", "")
|
||||
param("profileId", "amazon-48")
|
||||
param("name", "Cloud Agents")
|
||||
param("next-hour", "")
|
||||
param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
|
||||
param("region", "eu-west-1")
|
||||
param("terminate-idle-time", "15")
|
||||
param("not-checked", "")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
95
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
95
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
@@ -1,7 +1,8 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
|
||||
@@ -10,64 +11,64 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object GitHubPullRequests : BuildType({
|
||||
name = "GitHub Pull Requests"
|
||||
description = "Test GitHub pull requests"
|
||||
name = "GitHub Pull Requests"
|
||||
description = "Test GitHub pull requests"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.GitHubPullRequest)
|
||||
vcs {
|
||||
root(_Self.vcsRoots.GitHubPullRequest)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = """
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = """
|
||||
+:*
|
||||
-:<default>
|
||||
""".trimIndent()
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT
|
||||
branchFilter = ""
|
||||
}
|
||||
triggers {
|
||||
vcs {
|
||||
quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
features {
|
||||
pullRequests {
|
||||
provider = github {
|
||||
authType = token {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
filterTargetBranch = "refs/heads/master"
|
||||
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
|
||||
}
|
||||
}
|
||||
commitStatusPublisher {
|
||||
vcsRootExtId = "${GitHubPullRequest.id}"
|
||||
publisher = github {
|
||||
githubUrl = "https://api.github.com"
|
||||
authType = personalToken {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
}
|
||||
param("github_oauth_user", "AlexPl292")
|
||||
features {
|
||||
pullRequests {
|
||||
provider = github {
|
||||
authType = token {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
filterTargetBranch = "refs/heads/master"
|
||||
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
|
||||
}
|
||||
}
|
||||
commitStatusPublisher {
|
||||
vcsRootExtId = "${GitHubPullRequest.id}"
|
||||
publisher = github {
|
||||
githubUrl = "https://api.github.com"
|
||||
authType = personalToken {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
}
|
||||
param("github_oauth_user", "AlexPl292")
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
72
.teamcity/_Self/buildTypes/Nvim.kt
vendored
72
.teamcity/_Self/buildTypes/Nvim.kt
vendored
@@ -2,49 +2,53 @@ package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object Nvim : BuildType({
|
||||
name = "NVIM"
|
||||
description = "branch EAP"
|
||||
name = "Tests with nvim"
|
||||
description = "Running tests with nvim integration"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ideavim.nvim.path", "./nvim-linux64/bin/nvim")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
script {
|
||||
name = "Set up NeoVim"
|
||||
scriptContent = """
|
||||
wget https://github.com/neovim/neovim/releases/download/v0.4.4/nvim-linux64.tar.gz
|
||||
tar xzf nvim-linux64.tar.gz
|
||||
cd nvim-linux64/bin
|
||||
chmod +x nvim
|
||||
""".trimIndent()
|
||||
}
|
||||
gradle {
|
||||
tasks = "clean testWithNeovim"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_Nvim)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
script {
|
||||
scriptContent = "apt-get install neovim"
|
||||
}
|
||||
gradle {
|
||||
tasks = "--version"
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
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")
|
||||
}
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
40
.teamcity/_Self/buildTypes/PluginVerifier.kt
vendored
Normal file
40
.teamcity/_Self/buildTypes/PluginVerifier.kt
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object PluginVerifier : BuildType({
|
||||
name = "Plugin verification"
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean runPluginVerifier"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
60
.teamcity/_Self/buildTypes/Release.kt
vendored
60
.teamcity/_Self/buildTypes/Release.kt
vendored
@@ -1,36 +1,42 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
|
||||
object Release : BuildType({
|
||||
name = "Publish Release"
|
||||
description = "Build and publish IdeaVim plugin"
|
||||
name = "Publish Release"
|
||||
description = "Build and publish IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.60"
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.60"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password("env.ORG_GRADLE_PROJECT_publishToken", "credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4", label = "Password")
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
label = "Password"
|
||||
)
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
113
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
113
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
@@ -9,68 +9,67 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.ScheduleTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
|
||||
|
||||
object ReleaseEap : BuildType({
|
||||
name = "Publish EAP Build"
|
||||
description = "Build and publish EAP of IdeaVim plugin"
|
||||
name = "Publish EAP Build"
|
||||
description = "Build and publish EAP of IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.60.%build.counter%"
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "0.60.%build.counter%"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password("env.ORG_GRADLE_PROJECT_publishToken", "credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4", label = "Token")
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
|
||||
password("env.ORG_GRADLE_PROJECT_slackUrl", "credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5", label = "Slack Token")
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_publishToken",
|
||||
"credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4",
|
||||
label = "Token"
|
||||
)
|
||||
param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
|
||||
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
|
||||
password(
|
||||
"env.ORG_GRADLE_PROJECT_slackUrl",
|
||||
"credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5",
|
||||
label = "Slack Token"
|
||||
)
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin slackEapNotification"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
triggers {
|
||||
schedule {
|
||||
enabled = false
|
||||
schedulingPolicy = daily {
|
||||
hour = 22
|
||||
}
|
||||
branchFilter = ""
|
||||
triggerBuild = onWatchedBuildChange {
|
||||
buildType = "IdeaVim_TestsForIntelliJBranch146"
|
||||
watchedBuildRule = ScheduleTrigger.WatchedBuildRule.LAST_SUCCESSFUL
|
||||
watchedBuildBranchFilter = "<default>"
|
||||
promoteWatchedBuild = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean publishPlugin slackEapNotification"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
schedule {
|
||||
enabled = false
|
||||
schedulingPolicy = daily {
|
||||
hour = 22
|
||||
}
|
||||
branchFilter = ""
|
||||
triggerBuild = onWatchedBuildChange {
|
||||
buildType = "IdeaVim_TestsForIntelliJBranch146"
|
||||
watchedBuildRule = ScheduleTrigger.WatchedBuildRule.LAST_SUCCESSFUL
|
||||
watchedBuildBranchFilter = "<default>"
|
||||
promoteWatchedBuild = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
features {
|
||||
vcsLabeling {
|
||||
vcsRootId = "__ALL__"
|
||||
labelingPattern = "EAP-%system.build.number%"
|
||||
successfulOnly = true
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
snapshot(TestsForIntelliJ20192) {
|
||||
}
|
||||
snapshot(TestsForIntelliJ20193) {
|
||||
}
|
||||
snapshot(TestsForIntelliJ20201) {
|
||||
}
|
||||
features {
|
||||
vcsLabeling {
|
||||
vcsRootId = "${DslContext.settingsRoot.id}"
|
||||
labelingPattern = "%system.build.number%-EAP"
|
||||
successfulOnly = true
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@@ -1,42 +0,0 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20181 : BuildType({
|
||||
name = "Tests for IntelliJ 2018.1"
|
||||
description = "branch 181"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_181)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
@@ -1,42 +0,0 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20182 : BuildType({
|
||||
name = "Tests for IntelliJ 2018.2"
|
||||
description = "branch 182"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.2")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_181)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
@@ -1,43 +1,44 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20183 : BuildType({
|
||||
name = "Tests for IntelliJ 2018.3"
|
||||
description = "branch 183"
|
||||
name = "Tests for IntelliJ 2018.3"
|
||||
description = "branch 183"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.3")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.3")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_183)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_183)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
@@ -1,43 +0,0 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20191 : BuildType({
|
||||
name = "Tests for IntelliJ 2019.1"
|
||||
description = "branch 191"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2019.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_191_193)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
@@ -1,43 +0,0 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20192 : BuildType({
|
||||
name = "Tests for IntelliJ 2019.2"
|
||||
description = "branch 192"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2019.2")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_191_193)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
@@ -1,43 +0,0 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object TestsForIntelliJ20193 : BuildType({
|
||||
name = "Tests for IntelliJ 2019.3"
|
||||
description = "branch 193"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2019.3")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_191_193)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
47
.teamcity/_Self/buildTypes/TestsForIntelliJ_181-182.kt
vendored
Normal file
47
.teamcity/_Self/buildTypes/TestsForIntelliJ_181-182.kt
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class TestsForIntelliJ_181_branch(private val version: String) : BuildType({
|
||||
name = "Tests for IntelliJ $version"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-$version")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_181)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJ20181 : TestsForIntelliJ_181_branch("2018.1")
|
||||
object TestsForIntelliJ20182 : TestsForIntelliJ_181_branch("2018.2")
|
49
.teamcity/_Self/buildTypes/TestsForIntelliJ_191-193.kt
vendored
Normal file
49
.teamcity/_Self/buildTypes/TestsForIntelliJ_191-193.kt
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class TestsForIntelliJ_191_193_branch(private val version: String) : BuildType({
|
||||
name = "Tests for IntelliJ $version"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-$version")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_191_193)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJ20191 : TestsForIntelliJ_191_193_branch("2019.1")
|
||||
object TestsForIntelliJ20192 : TestsForIntelliJ_191_193_branch("2019.2")
|
||||
object TestsForIntelliJ20193 : TestsForIntelliJ_191_193_branch("2019.3")
|
8
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
8
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
@@ -5,8 +5,8 @@ package _Self.vcsRoots
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_181 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 181)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "181"
|
||||
useMirrors = false
|
||||
name = "https://github.com/JetBrains/ideavim (branch 181)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "181"
|
||||
useMirrors = false
|
||||
})
|
||||
|
8
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
8
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
@@ -5,8 +5,8 @@ package _Self.vcsRoots
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_183 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 183)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "183"
|
||||
useMirrors = false
|
||||
name = "https://github.com/JetBrains/ideavim (branch 183)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "183"
|
||||
useMirrors = false
|
||||
})
|
||||
|
8
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
8
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
@@ -5,8 +5,8 @@ package _Self.vcsRoots
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_191_193 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 191-193)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "191-193"
|
||||
useMirrors = false
|
||||
name = "https://github.com/JetBrains/ideavim (branch 191-193)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "191-193"
|
||||
useMirrors = false
|
||||
})
|
||||
|
11
.teamcity/_Self/vcsRoots/Branch_Nvim.kt
vendored
11
.teamcity/_Self/vcsRoots/Branch_Nvim.kt
vendored
@@ -1,11 +0,0 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_Nvim : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch nvim)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "neovim"
|
||||
})
|
12
.teamcity/_Self/vcsRoots/GitHubPullRequest.kt
vendored
12
.teamcity/_Self/vcsRoots/GitHubPullRequest.kt
vendored
@@ -3,10 +3,10 @@ package _Self.vcsRoots
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object GitHubPullRequest : GitVcsRoot({
|
||||
name = "IdeaVim Pull Requests"
|
||||
url = "git@github.com:JetBrains/ideavim.git"
|
||||
branchSpec = "+:refs/(pull/*)/head"
|
||||
authMethod = uploadedKey {
|
||||
uploadedKey = "Alex Plate TeamCity key"
|
||||
}
|
||||
name = "IdeaVim Pull Requests"
|
||||
url = "git@github.com:JetBrains/ideavim.git"
|
||||
branchSpec = "+:refs/(pull/*)/head"
|
||||
authMethod = uploadedKey {
|
||||
uploadedKey = "Alex Plate TeamCity key"
|
||||
}
|
||||
})
|
||||
|
23
CHANGES.md
23
CHANGES.md
@@ -29,6 +29,29 @@ usual beta standards.
|
||||
Check out `README.md` for the details.
|
||||
* `IdeaVim: track action Ids` command to find action ids for the `:action` command.
|
||||
Enable this option in "Search everywhere" (double shift).
|
||||
* Ability to enable extensions using `vim-plug` or `vundle` syntax.
|
||||
E.g. to enable commentary extension you can use one of the following commands:
|
||||
```vim
|
||||
set commentary
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'https://github.com/tpope/vim-commentary'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
...
|
||||
```
|
||||
This approach is especially handy if you have `.vimrc` with plugins registered via `vim-plug` or `vundle`.
|
||||
|
||||
|
||||
### Changes:
|
||||
* Fix `<Esc>` for dialogs. Now `<Esc>` will exit insert / visual mode and close the dialog from normal mode.
|
||||
* Add option to disable IdeaVim in dialogs / single line editors. [VIM-765](https://youtrack.jetbrains.com/issue/VIM-765)
|
||||
Use `set ideaenabledbufs=` to disable IdeaVim in dialog editors.
|
||||
_Note for EAP users: the option name can be changed for the stable release_
|
||||
|
||||
### Fixes:
|
||||
* [VIM-2150](https://youtrack.jetbrains.com/issue/VIM-2150) `Shift-D` should not delete an empty line
|
||||
* [VIM-2157](https://youtrack.jetbrains.com/issue/VIM-2157) Fix tab with an active template
|
||||
* [VIM-2156](https://youtrack.jetbrains.com/issue/VIM-2156) Correct up/down motions with inlays
|
||||
* [VIM-2144](https://youtrack.jetbrains.com/issue/VIM-2144) Correct text position after block insert with inlays
|
||||
|
||||
## 0.60, 2020-10-09
|
||||
|
||||
|
@@ -26,7 +26,12 @@ OK, ready to do some coding?
|
||||
* Fork the repository and clone it to the local machine.
|
||||
* Open the project with IntelliJ IDEA.
|
||||
|
||||
Yoo hoo! You’re all set to begin contributing. Here are some useful gradle commands:
|
||||
Yoo hoo! You’re all set to begin contributing.
|
||||
We've prepared some useful configurations for you:
|
||||
|
||||

|
||||
|
||||
And here are useful gradle commands:
|
||||
|
||||
* `./gradlew runIde` — start the dev version of IntelliJ IDEA with IdeaVim installed.
|
||||
* `./gradlew test` — run tests.
|
||||
@@ -136,5 +141,5 @@ This is just terrible. [You know what to do](https://github.com/JetBrains/ideavi
|
||||
* [Changelog](CHANGES.md)
|
||||
* [Contributors listing](AUTHORS.md)
|
||||
|
||||
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJ20201&guest=1
|
||||
[teamcity-build-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJ20201)/statusIcon.svg?guest=1
|
||||
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaVim_TestsForIntelliJEAP&guest=1
|
||||
[teamcity-build-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IdeaVim_TestsForIntelliJEAP)/statusIcon.svg?guest=1
|
||||
|
23
build.gradle
23
build.gradle
@@ -1,15 +1,19 @@
|
||||
import dev.feedforward.markdownto.DownParser
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "com.github.AlexPl292:mark-down-to-slack:1.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.intellij' version '0.5.0'
|
||||
id 'org.jetbrains.intellij' version '0.6.1'
|
||||
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
||||
id "org.jetbrains.changelog" version "0.6.2"
|
||||
}
|
||||
@@ -48,6 +52,12 @@ intellij {
|
||||
}
|
||||
}
|
||||
|
||||
runPluginVerifier {
|
||||
ideVersions = ["IC-2020.1.4", "IC-2020.2.3"]
|
||||
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
||||
teamCityOutputFormat = true
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
@@ -73,8 +83,8 @@ compileTestKotlin {
|
||||
}
|
||||
|
||||
detekt {
|
||||
config = files("./detekt/config.yaml")
|
||||
baseline = file("${rootProject.projectDir}/detekt/baseline.xml")
|
||||
config = files("${rootProject.projectDir}/.detekt/config.yaml")
|
||||
baseline = file("${rootProject.projectDir}/.detekt/baseline.xml")
|
||||
input = files("src")
|
||||
|
||||
buildUponDefaultConfig = true
|
||||
@@ -90,7 +100,7 @@ tasks.detekt.jvmTarget = javaVersion
|
||||
|
||||
task testWithNeovim(type: Test) {
|
||||
group = "verification"
|
||||
systemProperty "ideavim.neovim.test", 'true'
|
||||
systemProperty "ideavim.nvim.test", 'true'
|
||||
}
|
||||
|
||||
changelog {
|
||||
@@ -107,7 +117,8 @@ tasks.register("slackEapNotification") {
|
||||
doLast {
|
||||
if (!slackUrl) return
|
||||
def post = new URL(slackUrl).openConnection()
|
||||
def changeLog = changelog.getUnreleased().toPlainText()
|
||||
def changeLog = changelog.getUnreleased().toText()
|
||||
def slackDown = new DownParser(changeLog, true).toSlack().toString()
|
||||
def message = """
|
||||
{
|
||||
"text": "New version of IdeaVim",
|
||||
@@ -116,7 +127,7 @@ tasks.register("slackEapNotification") {
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "IdeaVim EAP $version has been released\\n$changeLog"
|
||||
"text": "IdeaVim EAP $version has been released\\n$slackDown"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -1,374 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues></ManuallySuppressedIssues>
|
||||
<CurrentIssues>
|
||||
<ID>ComplexMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>ComplexMethod:CommandHandler.kt$CommandHandler$ @Throws(ExException::class) fun process(editor: Editor, context: DataContext, cmd: ExCommand, count: Int): Boolean</ID>
|
||||
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
|
||||
<ID>ComplexMethod:CommandState.kt$CommandState$private fun getStatusString(pos: Int): String</ID>
|
||||
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ private fun showOptions(editor: Editor?, opts: Collection<Option<*>>, showIntro: Boolean)</ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun moveCaretToEndPosition( editor: Editor, caret: Caret, startOffset: Int, endOffset: Int, typeInRegister: SelectionType, modeInEditor: CommandState.SubMode, caretAfterInsertedText: Boolean )</ID>
|
||||
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets(editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map<String, Any>): List<Int></ID>
|
||||
<ID>ComplexMethod:SearchHelperKt.kt$// bounds are considered inside corresponding quotes fun checkInString(chars: CharSequence, currentPos: Int, str: Boolean): Boolean</ID>
|
||||
<ID>ComplexMethod:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
|
||||
<ID>ComplexMethod:VimExchangeExtension.kt$VimExchangeExtension.Operator$private fun compareExchanges(x: Exchange, y: Exchange): ExchangeCompareResult</ID>
|
||||
<ID>ComplexMethod:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic fun inputString(editor: Editor, prompt: String, finishOn: Char?): String</ID>
|
||||
<ID>ComplexMethod:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
|
||||
<ID>ComplexMethod:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
|
||||
<ID>ComplexMethod:VisualGroup.kt$private fun setVisualSelection(selectionStart: Int, selectionEnd: Int, caret: Caret)</ID>
|
||||
<ID>LongMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
|
||||
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
|
||||
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
|
||||
<ID>MagicNumber:ActionListHandler.kt$ActionListHandler$50</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$3</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$6</ID>
|
||||
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$7</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$10</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$20</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$5</ID>
|
||||
<ID>MagicNumber:AddInlineInlaysAction.kt$AddInlineInlaysAction$7</ID>
|
||||
<ID>MagicNumber:BufferListHandler.kt$3</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$11</ID>
|
||||
<ID>MagicNumber:CmdHandler.kt$CmdHandler$12</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$10</ID>
|
||||
<ID>MagicNumber:CommandBuilder.kt$CommandBuilder$999999999</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$6</ID>
|
||||
<ID>MagicNumber:ConfigurationMigrators.kt$Version 6 to 7 config migration$7</ID>
|
||||
<ID>MagicNumber:EditorHelper.kt$10</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x05</ID>
|
||||
<ID>MagicNumber:ExKeyBindings.kt$ExKeyBindings$0x08</ID>
|
||||
<ID>MagicNumber:HistoryHandler.kt$HistoryHandler$7</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$200</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$3</ID>
|
||||
<ID>MagicNumber:JumpsHandler.kt$JumpsHandler$5</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$200</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$3</ID>
|
||||
<ID>MagicNumber:MarksHandler.kt$MarksHandler$5</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$100</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$1000</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$19</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$20</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$3</ID>
|
||||
<ID>MagicNumber:OptionsManager.kt$OptionsManager$80</ID>
|
||||
<ID>MagicNumber:ProcessExEntryAction.kt$ProcessExEntryAction$0x0a</ID>
|
||||
<ID>MagicNumber:RegistersHandler.kt$RegistersHandler$200</ID>
|
||||
<ID>MagicNumber:SearchHelperKt.kt$3</ID>
|
||||
<ID>MagicNumber:SelectLastFileHandler.kt$SelectLastFileHandler$999</ID>
|
||||
<ID>MagicNumber:SelectionType.kt$SelectionType.BLOCK_WISE$3</ID>
|
||||
<ID>MagicNumber:ShiftLeftHandler.kt$ShiftLeftHandler$31</ID>
|
||||
<ID>MagicNumber:ShiftRightHandler.kt$ShiftRightHandler$31</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
|
||||
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
|
||||
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
|
||||
<ID>MaxLineLength:ActionHandler.kt$ActionHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY, SAVE_VISUAL)</ID>
|
||||
<ID>MaxLineLength:ActionListHandler.kt$ActionListHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:AddInlineInlaysAction.kt$AddInlineInlaysAction$inlayModel.addInlineElement(offset, relatesToPrecedingText, HintRenderer(if (relatesToPrecedingText) ":$text" else "$text:"))</ID>
|
||||
<ID>MaxLineLength:AsciiHandler.kt$AsciiHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:BufferListHandler.kt$BufferListHandler$val lineNumPad = if (displayFileName.length < FILE_NAME_PAD) (FILE_NAME_PAD - displayFileName.length).toString() else ""</ID>
|
||||
<ID>MaxLineLength:BufferListHandler.kt$private</ID>
|
||||
<ID>MaxLineLength:ChangeCharactersAction.kt$ChangeCharactersAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)</ID>
|
||||
<ID>MaxLineLength:ChangeEditorActionHandler.kt$ChangeEditorActionHandler.ForEachCaret$abstract fun execute(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Boolean</ID>
|
||||
<ID>MaxLineLength:ChangeEndOfLineAction.kt$ChangeEndOfLineAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)</ID>
|
||||
<ID>MaxLineLength:ChangeLineAction.kt$ChangeLineAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)</ID>
|
||||
<ID>MaxLineLength:ChangeNumberIncAction.kt$IncAction$override</ID>
|
||||
<ID>MaxLineLength:ChangeVisualLinesAction.kt$ChangeVisualLinesAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)</ID>
|
||||
<ID>MaxLineLength:ChangeVisualLinesEndAction.kt$ChangeVisualLinesEndAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)</ID>
|
||||
<ID>MaxLineLength:ChangeVisualNumberIncAction.kt$IncNumber$override</ID>
|
||||
<ID>MaxLineLength:ChangeVisualNumberIncAction.kt$IncNumber$return VimPlugin.getChange().changeNumberVisualMode(editor, caret, range.toVimTextRange(false), inc * cmd.count, avalanche)</ID>
|
||||
<ID>MaxLineLength:CmdClearHandler.kt$CmdClearHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:CmdHandler.kt$CmdHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:Command.kt$Command$constructor(rawCount: Int, register: Char): this(rawCount, NonExecutableActionHandler, Type.SELECT_REGISTER, EnumSet.of(CommandFlags.FLAG_EXPECT_MORE)) { this.register = register }</ID>
|
||||
<ID>MaxLineLength:CommandState.kt$CommandState$mappingState.mappingMode = if (modeState.mode == Mode.OP_PENDING) MappingMode.OP_PENDING else modeToMappingMode(mode)</ID>
|
||||
<ID>MaxLineLength:CommandStateExtensions.kt$CommandState.Mode.COMMAND, CommandState.Mode.CMD_LINE, CommandState.Mode.REPLACE, CommandState.Mode.OP_PENDING -> false</ID>
|
||||
<ID>MaxLineLength:CommandStateExtensions.kt$CommandState.Mode.COMMAND, CommandState.Mode.CMD_LINE, CommandState.Mode.REPLACE, CommandState.Mode.OP_PENDING -> usesVirtualSpace</ID>
|
||||
<ID>MaxLineLength:CommandStateExtensions.kt$CommandState.Mode.REPLACE, CommandState.Mode.CMD_LINE, CommandState.Mode.COMMAND, CommandState.Mode.INSERT, CommandState.Mode.OP_PENDING -> false</ID>
|
||||
<ID>MaxLineLength:CopyTextHandler.kt$CopyTextHandler$val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = true, caretAfterInsertedText = false, putToLine = line)</ID>
|
||||
<ID>MaxLineLength:DeleteJoinLinesAction.kt$DeleteJoinLinesAction$editor.caretModel.runForEachCaret({ caret: Caret -> if (!VimPlugin.getChange().deleteJoinLines(editor, caret, count, false)) res.set(false) }, true)</ID>
|
||||
<ID>MaxLineLength:DeleteJoinLinesSpacesAction.kt$DeleteJoinLinesSpacesAction$editor.caretModel.runForEachCaret({ caret: Caret -> if (!VimPlugin.getChange().deleteJoinLines(editor, caret, count, true)) res.set(false) }, true)</ID>
|
||||
<ID>MaxLineLength:DeleteLinesHandler.kt$DeleteLinesHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)</ID>
|
||||
<ID>MaxLineLength:DumpLineHandler.kt$DumpLineHandler$logger.debug("Offset $i, char=${chars[i]}, lp=${editor.offsetToLogicalPosition(i)}, vp=${editor.offsetToVisualPosition(i)}")</ID>
|
||||
<ID>MaxLineLength:DuplicableOperatorAction.kt$DuplicableOperatorAction</ID>
|
||||
<ID>MaxLineLength:EditFileHandler.kt$EditFileHandler$ApplicationManager.getApplication().invokeLater { KeyHandler.executeAction("OpenFile", EditorDataContext(editor, context)) }</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:ExKeyBindings.kt$ExKeyBindings$KeyBinding(KeyStroke.getKeyStroke(0x08.toChar().toInt(), KeyEvent.CTRL_DOWN_MASK), ExEditorKit.deletePrevCharAction)</ID>
|
||||
<ID>MaxLineLength:ExRanges.kt$SearchRange$override</ID>
|
||||
<ID>MaxLineLength:GnNextTextObject.kt$GnNextTextObject$override</ID>
|
||||
<ID>MaxLineLength:GnPreviousTextObject.kt$GnPreviousTextObject$override</ID>
|
||||
<ID>MaxLineLength:GotoCharacterHandler.kt$GotoCharacterHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_IS_COUNT, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:GotoLineHandler.kt$GotoLineHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_REQUIRED, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$ fun controlNonVimSelectionChange(editor: Editor, selectionSource: VimListenerManager.SelectionSource = VimListenerManager.SelectionSource.OTHER)</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$CommandState.Mode.SELECT -> VimPlugin.getVisualMotion().enterSelectMode(editor, VimPlugin.getVisualMotion().autodetectVisualSubmode(editor))</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$CommandState.Mode.VISUAL -> VimPlugin.getVisualMotion().enterVisualMode(editor, VimPlugin.getVisualMotion().autodetectVisualSubmode(editor))</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$private</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$private fun dontChangeMode(editor: Editor): Boolean</ID>
|
||||
<ID>MaxLineLength:IdeaSelectionControl.kt$IdeaSelectionControl$selectionSource == VimListenerManager.SelectionSource.MOUSE && SelectModeOptionData.mouse in OptionsManager.selectmode</ID>
|
||||
<ID>MaxLineLength:IdeaSpecifics.kt$IdeaSpecifics.VimActionListener$if (surrounderAction == action.javaClass.name && surrounderItems.any { action.templatePresentation.text.endsWith(it) }) { editor?.let { val commandState = editor.commandState while (commandState.mode != CommandState.Mode.COMMAND) { commandState.popModes() } VimPlugin.getChange().insertBeforeCursor(it, dataContext) KeyHandler.getInstance().reset(it) } }</ID>
|
||||
<ID>MaxLineLength:IdeaSpecifics.kt$IdeaSpecifics.VimActionListener$private val surrounderAction = "com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler\$InvokeSurrounderAction"</ID>
|
||||
<ID>MaxLineLength:IdeaSpecifics.kt$IdeaSpecifics.VimActionListener.<no name provided>$val predictedMode = IdeaSelectionControl.predictMode(eventEditor, VimListenerManager.SelectionSource.OTHER)</ID>
|
||||
<ID>MaxLineLength:IdeaSpecifics.kt$IdeaSpecifics.VimTemplateManagerListener${ // Enable insert mode if there is no selection in template // Template with selection is handled by [com.maddyhome.idea.vim.group.visual.VisualMotionGroup.controlNonVimSelectionChange] if (editor.inNormalMode) { VimPlugin.getChange().insertBeforeCursor(editor, EditorDataContext(editor)) KeyHandler.getInstance().reset(editor) } }</ID>
|
||||
<ID>MaxLineLength:IdeaSpecifics.kt$IdeaSpecifics.VimTemplateManagerListener.<no name provided>$override</ID>
|
||||
<ID>MaxLineLength:JoinLinesHandler.kt$JoinLinesHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)</ID>
|
||||
<ID>MaxLineLength:MapHandler.kt$MapHandler$VimPlugin.getKey().putKeyMapping(modes, arguments.fromKeys, MappingOwner.IdeaVim, arguments.toKeys, commandInfo.isRecursive)</ID>
|
||||
<ID>MaxLineLength:MapHandler.kt$MapHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:MapHandler.kt$MapHandler.CommandInfo$private</ID>
|
||||
<ID>MaxLineLength:MappingInfo.kt$MappingInfo$sealed</ID>
|
||||
<ID>MaxLineLength:MarksHandler.kt$MarksHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:MotionActionHandler.kt$MotionActionHandler$fun getHandlerOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int</ID>
|
||||
<ID>MaxLineLength:MotionActionHandler.kt$MotionActionHandler.ForEachCaret$abstract</ID>
|
||||
<ID>MaxLineLength:MotionArrowDownAction.kt$MotionArrowDownAction$override</ID>
|
||||
<ID>MaxLineLength:MotionArrowDownAction.kt$MotionArrowDownAction$override val keyStrokesSet: Set<MutableList<KeyStroke>> = setOf(parseKeys("<Down>"), mutableListOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0)))</ID>
|
||||
<ID>MaxLineLength:MotionArrowLeftAction.kt$MotionArrowLeftAction$override</ID>
|
||||
<ID>MaxLineLength:MotionArrowLeftAction.kt$MotionArrowLeftAction$override val keyStrokesSet: Set<List<KeyStroke>> = setOf(parseKeys("<Left>"), listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0)))</ID>
|
||||
<ID>MaxLineLength:MotionArrowRightAction.kt$MotionArrowRightAction$override</ID>
|
||||
<ID>MaxLineLength:MotionArrowUpAction.kt$MotionArrowUpAction$override</ID>
|
||||
<ID>MaxLineLength:MotionArrowUpAction.kt$MotionArrowUpAction$override val keyStrokesSet: Set<List<KeyStroke>> = setOf(parseKeys("<Up>"), listOf(KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, 0)))</ID>
|
||||
<ID>MaxLineLength:MotionDownActions.kt$MotionDownAction$override</ID>
|
||||
<ID>MaxLineLength:MotionDownActions.kt$MotionDownCtrlNAction$EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN).execute(editor, primaryCaret, context)</ID>
|
||||
<ID>MaxLineLength:MotionDownActions.kt$MotionDownCtrlNAction$override</ID>
|
||||
<ID>MaxLineLength:MotionDownActions.kt$MotionDownNotLineWiseAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerBlockParenAction.kt$MotionInnerBlockParenAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerBlockSingleQuoteAction.kt$MotionInnerBlockSingleQuoteAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerBlockTagAction.kt$MotionInnerBlockTagAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerParagraphAction.kt$MotionInnerParagraphAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerSentenceAction.kt$MotionInnerSentenceAction$override</ID>
|
||||
<ID>MaxLineLength:MotionInnerWordAction.kt$MotionInnerWordAction$override</ID>
|
||||
<ID>MaxLineLength:MotionJumpNextAction.kt$MotionJumpNextAction$override</ID>
|
||||
<ID>MaxLineLength:MotionJumpPreviousAction.kt$MotionJumpPreviousAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBigWordAction.kt$MotionOuterBigWordAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockAngleAction.kt$MotionOuterBlockAngleAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockBackQuoteAction.kt$MotionOuterBlockBackQuoteAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockBraceAction.kt$MotionOuterBlockBraceAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockBracketAction.kt$MotionOuterBlockBracketAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockDoubleQuoteAction.kt$MotionOuterBlockDoubleQuoteAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockParenAction.kt$MotionOuterBlockParenAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockSingleQuoteAction.kt$MotionOuterBlockSingleQuoteAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterBlockTagAction.kt$MotionOuterBlockTagAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterParagraphAction.kt$MotionOuterParagraphAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterSentenceAction.kt$MotionOuterSentenceAction$override</ID>
|
||||
<ID>MaxLineLength:MotionOuterWordAction.kt$MotionOuterWordAction$override</ID>
|
||||
<ID>MaxLineLength:MotionScrollHalfWidthLeftAction.kt$MotionScrollHalfWidthLeftAction$return VimPlugin.getMotion().scrollColumns(editor, cmd.count * (EditorHelper.getApproximateScreenWidth(editor) / 2))</ID>
|
||||
<ID>MaxLineLength:MotionScrollHalfWidthRightAction.kt$MotionScrollHalfWidthRightAction$return VimPlugin.getMotion().scrollColumns(editor, -cmd.count * (EditorHelper.getApproximateScreenWidth(editor) / 2))</ID>
|
||||
<ID>MaxLineLength:MotionScrollPageDownAction.kt$MotionScrollPageDownInsertModeAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP, CommandFlags.FLAG_CLEAR_STROKES)</ID>
|
||||
<ID>MaxLineLength:MotionScrollPageUpAction.kt$MotionScrollPageUpInsertModeAction$override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP, CommandFlags.FLAG_CLEAR_STROKES)</ID>
|
||||
<ID>MaxLineLength:MotionUpActions.kt$MotionUpAction$override</ID>
|
||||
<ID>MaxLineLength:MotionUpActions.kt$MotionUpCtrlPAction$EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_MOVE_CARET_UP).execute(editor, primaryCaret, context)</ID>
|
||||
<ID>MaxLineLength:MotionUpActions.kt$MotionUpCtrlPAction$override</ID>
|
||||
<ID>MaxLineLength:MotionUpActions.kt$MotionUpNotLineWiseAction$override</ID>
|
||||
<ID>MaxLineLength:MoveTextHandler.kt$MoveTextHandler$val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = true, caretAfterInsertedText = false, putToLine = line)</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$"""Add <code>ideaput</code> to <code>clipboard</code> option to perform a put via the IDE<br/><b><code>set clipboard+=ideaput</code></b>"""</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$fun enableRepeatingMode()</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set clipboard+=ideaput", "ideaput") { OptionsManager.clipboard.append(ClipboardOptionsData.ideaput) })</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService$notification.addAction(AppendToIdeaVimRcAction(notification, "set ideajoin", "ideajoin") { OptionsManager.ideajoin.set() })</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$createIdeaVimRcManually("Option is enabled, but the file is not modified<br/>Please modify <code>~/.ideavimrc</code> manually", project)</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$private inner</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.AppendToIdeaVimRcAction$val successNotification = Notification(IDEAVIM_NOTIFICATION_ID, IDEAVIM_NOTIFICATION_TITLE, "<code>$optionName</code> is enabled", NotificationType.INFORMATION)</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.Companion$val notification = Notification(IDEAVIM_NOTIFICATION_ID, IDEAVIM_NOTIFICATION_TITLE, message, NotificationType.WARNING)</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.Companion$var actionName = if (SystemInfo.isMac) "Reveal Home in Finder" else "Show Home in " + RevealFileAction.getFileManagerName()</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.HelpLink$private inner</ID>
|
||||
<ID>MaxLineLength:NotificationService.kt$NotificationService.OpenIdeaVimRcAction$createIdeaVimRcManually("Cannot create configuration file.<br/>Please create <code>~/.ideavimrc</code> manually", eventProject)</ID>
|
||||
<ID>MaxLineLength:OnlyHandler.kt$OnlyHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$IdeaRefactorMode$if (!segmentRange.isEmpty && segmentRange.endOffset == editor.caretModel.offset && editor.caretModel.offset != 0) { editor.caretModel.moveToOffset(editor.caretModel.offset - 1) }</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val idearefactormode = addOption(BoundStringOption(IdeaRefactorMode.name, IdeaRefactorMode.name, IdeaRefactorMode.select, IdeaRefactorMode.availableValues))</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val ideastatusicon = addOption(BoundStringOption(IdeaStatusIcon.name, IdeaStatusIcon.name, IdeaStatusIcon.enabled, IdeaStatusIcon.allValues))</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val nrformats = addOption(BoundListOption("nrformats", "nf", arrayOf("octal", "hex"), arrayOf("octal", "hex", "alpha")))</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val selection = addOption(BoundStringOption("selection", "sel", "inclusive", arrayOf("old", "inclusive", "exclusive")))</ID>
|
||||
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val showcmd = addOption(ToggleOption("showcmd", "sc", true)) // Vim: Off by default on platforms with possibly slow tty. On by default elsewhere.</ID>
|
||||
<ID>MaxLineLength:PlaybackRegisterAction.kt$PlaybackRegisterAction$application.runWriteAction { res.set(VimPlugin.getMacro().playbackLastRegister(editor, context, project, cmd.count)) }</ID>
|
||||
<ID>MaxLineLength:PlaybackRegisterAction.kt$PlaybackRegisterAction$application.runWriteAction { res.set(VimPlugin.getMacro().playbackRegister(editor, context, project, reg, cmd.count)) }</ID>
|
||||
<ID>MaxLineLength:ProcessExEntryAction.kt$ProcessExEntryAction$override val keyStrokesSet: Set<List<KeyStroke>> = parseKeysSet("<CR>", "<C-M>", 0x0a.toChar().toString(), 0x0d.toChar().toString())</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutData$if (rawIndent && textData?.typeInRegister != SelectionType.LINE_WISE && visualSelection?.typeInEditor != SelectionType.LINE_WISE) false else rawIndent</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$SelectionType.BLOCK_WISE -> listOf(editor.logicalPositionToOffset(LogicalPosition(firstSelectedLine, startColumnOfSelection)))</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$SelectionType.CHARACTER_WISE -> putTextCharacterwise(editor, caret, context, text, type, mode, startOffset, count, indent, cursorAfter)</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$SelectionType.LINE_WISE -> putTextLinewise(editor, caret, context, text, type, mode, startOffset, count, indent, cursorAfter)</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$data.visualSelection.caretsAndSelections.entries.sortedByDescending { it.key.logicalPosition }</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$if (data.textData.typeInRegister.isChar && text.lastOrNull() == '\n' && data.visualSelection?.typeInEditor?.isLine == false) text = text.dropLast(1)</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$if (startOffset > 0 && startOffset == editor.document.textLength && editor.document.charsSequence[startOffset - 1] != '\n') { application.runWriteAction { editor.document.insertString(startOffset, "\n") } startOffset++ }</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$moveCaretToEndPosition(editor, caret, startOffset, endOffset, text.typeInRegister, subMode, data.caretAfterInsertedText)</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$private</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$startOffset = min(editor.document.textLength, VimPlugin.getMotion().moveCaretToLineEnd(editor, line, true) + 1)</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$val endOffset = if (data.indent) doIndent(editor, caret, context, startOffset, startOffset + text.text.length) else startOffset + text.text.length</ID>
|
||||
<ID>MaxLineLength:PutGroup.kt$PutGroup$val startOffset = prepareDocumentAndGetStartOffsets(editor, caret, text.typeInRegister, data, additionalData).first()</ID>
|
||||
<ID>MaxLineLength:PutLinesHandler.kt$PutLinesHandler$val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = false, caretAfterInsertedText = false, putToLine = line)</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$PutTextAfterCursorAction : PutTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextAfterCursorActionMoveCursor : PutTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextAfterCursorNoIndentAction : PutTextBaseAction</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:PutTextAction.kt$PutTextBeforeCursorAction : PutTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBeforeCursorActionMoveCursor : PutTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutTextAction.kt$PutTextBeforeCursorNoIndentAction : PutTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextAfterCursorAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextAfterCursorMoveCursorAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextAfterCursorNoIndentAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextBaseAction$override</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextBeforeCursorAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextBeforeCursorMoveCursorAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:PutVisualTextAction.kt$PutVisualTextBeforeCursorNoIndentAction : PutVisualTextBaseAction</ID>
|
||||
<ID>MaxLineLength:Ranges.kt$Ranges$if (range.isMove) MotionGroup.moveCaret(editor, caret, VimPlugin.getMotion().moveCaretToLine(editor, endLine, editor.caretModel.primaryCaret))</ID>
|
||||
<ID>MaxLineLength:Register.kt$Register$constructor(name: Char, type: SelectionType, text: String, transferableData: MutableList<out TextBlockTransferableData>) { this.name = name this.type = type this.keys = StringHelper.stringToKeys(text) this.transferableData = transferableData this.rawText = text }</ID>
|
||||
<ID>MaxLineLength:Register.kt$Register$constructor(name: Char, type: SelectionType, text: String, transferableData: MutableList<out TextBlockTransferableData>, rawText: String) { this.name = name this.type = type this.keys = StringHelper.stringToKeys(text) this.transferableData = transferableData this.rawText = rawText }</ID>
|
||||
<ID>MaxLineLength:RepeatChangeAction.kt$RepeatChangeAction$processor.executeCommand(editor.project, { lastHandler.execute(editor, context) }, "Vim " + lastHandler.javaClass.simpleName, null)</ID>
|
||||
<ID>MaxLineLength:RepeatHandler.kt$RepeatHandler$MotionGroup.moveCaret(editor, caret, VimPlugin.getMotion().moveCaretToLine(editor, line, editor.caretModel.primaryCaret))</ID>
|
||||
<ID>MaxLineLength:RepeatHandler.kt$RepeatHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_REQUIRED, Access.SELF_SYNCHRONIZED, DONT_SAVE_LAST)</ID>
|
||||
<ID>MaxLineLength:ReplaceWithRegister.kt$ReplaceWithRegister.Companion$val putData = PutData(textData, visualSelection, 1, insertTextBeforeCaret = true, rawIndent = true, caretAfterInsertedText = false, putToLine = -1)</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:RunnableHelper.kt$RunnableHelper$CommandProcessor.getInstance().executeCommand(project, { ApplicationManager.getApplication().runReadAction(cmd) }, name, groupId)</ID>
|
||||
<ID>MaxLineLength:RunnableHelper.kt$RunnableHelper$CommandProcessor.getInstance().executeCommand(project, { ApplicationManager.getApplication().runWriteAction(cmd) }, name, groupId)</ID>
|
||||
<ID>MaxLineLength:SearchEntryFwdAction.kt$SearchEntryFwdAction$return VimPlugin.getSearch().search(editor, caret, argument.string, count, enumSetOf(CommandFlags.FLAG_SEARCH_FWD), false)</ID>
|
||||
<ID>MaxLineLength:SearchEntryRevAction.kt$SearchEntryRevAction$return VimPlugin.getSearch().search(editor, caret, argument.string, count, enumSetOf(CommandFlags.FLAG_SEARCH_REV), false)</ID>
|
||||
<ID>MaxLineLength:SearchHelperKt.kt$// position of last found unpaired single quote var lastOpenSingleQuotePos = -1 // whether we are in double quotes // true - definitely yes // false - definitely no // null - maybe yes, in case we found such combination: '" // in that situation it may be double quote inside single quotes, so we cannot threat it as double quote pair open/close var inQuote: Boolean? = false val charsToSearch = setOf('\'', '"', '\n') var found = findPositionOfFirstCharacter(chars, begin, charsToSearch, false, Direction.FORWARD) while (found != null && found.first != '\n') { val i = found.second val c = found.first when (c) { '"' -> { // if [maybe] in quote, then we know we found closing quote, so now we surely are not in quote if (inQuote == null || inQuote) { // we just found closing double quote inQuote = false // reset last found single quote, as it was in string literal lastOpenSingleQuotePos = -1 // if we previously found unclosed single quote } else if (lastOpenSingleQuotePos >= 0) { // ...but we are too far from it if (i - lastOpenSingleQuotePos > 2) { // then it definitely was not opening single quote lastOpenSingleQuotePos = -1 // and we found opening double quote inQuote = true } else { // else we don't know if we inside double or single quotes or not inQuote = null } // we were not in double nor in single quote, so now we are in double quote } else { inQuote = true } } '\'' -> { // if we previously found unclosed single quote if (lastOpenSingleQuotePos >= 0) { // ...but we are too far from it if (i - lastOpenSingleQuotePos > 3) { // ... forget about it and threat current one as unclosed lastOpenSingleQuotePos = i } else { // else we found closing single quote lastOpenSingleQuotePos = -1 // and if we didn't know whether we are in double quote or not if (inQuote == null) { // then now we are definitely not in inQuote = false } } } else { // we found opening single quote lastOpenSingleQuotePos = i } } } yield(State(i, c, inQuote, lastOpenSingleQuotePos)) found = findPositionOfFirstCharacter(chars, i + Direction.FORWARD.toInt(), charsToSearch, false, Direction.FORWARD) }</ID>
|
||||
<ID>MaxLineLength:SelectMotionLeftAction.kt$SelectMotionLeftAction$override</ID>
|
||||
<ID>MaxLineLength:SelectMotionRightAction.kt$SelectMotionRightAction$override</ID>
|
||||
<ID>MaxLineLength:SelectToggleVisualMode.kt$SelectToggleVisualMode$if (it.offset == it.selectionEnd && it.visualLineStart <= it.offset - VimPlugin.getVisualMotion().selectionAdj) { it.moveToInlayAwareOffset(it.offset - VimPlugin.getVisualMotion().selectionAdj) }</ID>
|
||||
<ID>MaxLineLength:ShiftLeft.kt$ShiftLeftLinesAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftLeft.kt$ShiftLeftMotionAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftLeft.kt$ShiftLeftVisualAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftLeftHandler.kt$ShiftLeftHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)</ID>
|
||||
<ID>MaxLineLength:ShiftRight.kt$ShiftRightLinesAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftRight.kt$ShiftRightMotionAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftRight.kt$ShiftRightVisualAction$override</ID>
|
||||
<ID>MaxLineLength:ShiftRightHandler.kt$ShiftRightHandler$override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)</ID>
|
||||
<ID>MaxLineLength:ShowCmd.kt$Widget : EditorBasedWidgetMultiframeTextPresentation</ID>
|
||||
<ID>MaxLineLength:SortHandler.kt$SortHandler$primaryCaret.moveToInlayAwareOffset(VimPlugin.getMotion().moveCaretToLineStartSkipLeading(editor, range.startLine))</ID>
|
||||
<ID>MaxLineLength:SortHandler.kt$SortHandler.LineComparator$private</ID>
|
||||
<ID>MaxLineLength:SpecialKeyHandlers.kt$NonShiftedSpecialKeyHandler$abstract</ID>
|
||||
<ID>MaxLineLength:SpecialKeyHandlers.kt$NonShiftedSpecialKeyHandler$final override</ID>
|
||||
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$PropertiesComponent.getInstance().setValue(IDEAVIM_STATISTICS_TIMESTAMP_KEY, System.currentTimeMillis().toString())</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:TextObjectActionHandler.kt$TextObjectActionHandler$abstract fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange?</ID>
|
||||
<ID>MaxLineLength:UserDataManager.kt$private</ID>
|
||||
<ID>MaxLineLength:UserDataManager.kt$var Caret.vimInsertStart: RangeMarker by userDataOr { (this as Caret).editor.document.createRangeMarker(this.offset, this.offset) }</ID>
|
||||
<ID>MaxLineLength:UserDataManager.kt$var Caret.vimLastColumn: Int by userDataCaretToEditorOr { (this as Caret).visualPosition.column - this.amountOfInlaysBeforeCaret }</ID>
|
||||
<ID>MaxLineLength:VimExchangeExtension.kt$VimExchangeExtension.Operator$VimPlugin.getMark().setChangeMarks(editor, TextRange(editor.getMarkOffset(targetExchange.start), editor.getMarkOffset(targetExchange.end) + 1))</ID>
|
||||
<ID>MaxLineLength:VimExchangeExtension.kt$VimExchangeExtension.Operator$primaryCaret.moveToInlayAwareLogicalPosition(LogicalPosition(ex1.start.logicalLine - verticalOffset, ex1.start.col))</ID>
|
||||
<ID>MaxLineLength:VimExchangeExtension.kt$VimExchangeExtension.Operator$primaryCaret.moveToInlayAwareLogicalPosition(LogicalPosition(ex1.start.logicalLine, ex1.start.col - horizontalOffset))</ID>
|
||||
<ID>MaxLineLength:VimExtensionFacade.kt$VimExtensionFacade$ @JvmStatic @ScheduledForRemoval(inVersion = "0.58") @Deprecated("Only for EasyMotion support") fun putExtensionHandlerMapping(modes: Set<MappingMode>, fromKeys: List<KeyStroke>, extensionHandler: VimExtensionHandler, recursive: Boolean)</ID>
|
||||
<ID>MaxLineLength:VimExtensionFacade.kt$VimExtensionFacade$VimPlugin.getKey().putKeyMapping(modes, fromKeys, MappingOwner.Plugin.get("easymotion"), extensionHandler, recursive)</ID>
|
||||
<ID>MaxLineLength:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler${ //from vim-highlightedyank docs: When a new text is yanked or user starts editing, the old highlighting would be deleted clearAllYankHighlighters() this.editor = editor val project = editor.project if (project != null) { Disposer.register(VimProjectService.getInstance(project), Disposable { this.editor = null yankHighlighters.clear() }) } if (range.isMultiple) { for (i in 0 until range.size()) { highlightSingleRange(editor, range.startOffsets[i]..range.endOffsets[i]) } } else { highlightSingleRange(editor, range.startOffset..range.endOffset) } }</ID>
|
||||
<ID>MaxLineLength:VimHighlightedYank.kt$private val DEFAULT_HIGHLIGHT_TEXT_COLOR: Color = EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES.defaultAttributes.backgroundColor</ID>
|
||||
<ID>MaxLineLength:VimListenerManager.kt$VimListenerManager.EditorMouseHandler$return caret.offset == lineEnd && lineEnd != lineStart && caret.offset - 1 == caret.selectionStart && caret.offset == caret.selectionEnd</ID>
|
||||
<ID>MaxLineLength:VimListenerManager.kt$VimListenerManager.ProjectListeners$ProjectManager.getInstance().openProjects.filterNot { it.isDisposed }.forEach { IdeaSpecifics.removeIdeaSpecificsListeners(it) }</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension$putExtensionHandlerMapping(MappingMode.NXO, parseKeys(ALL_OCCURRENCES), owner, AllOccurrencesHandler(whole = false), false )</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension$putExtensionHandlerMapping(MappingMode.NXO, parseKeys(ALL_WHOLE_OCCURRENCES), owner, AllOccurrencesHandler(), false )</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension$putExtensionHandlerMapping(MappingMode.NXO, parseKeys(NEXT_OCCURRENCE), owner, NextOccurrenceHandler(whole = false), false)</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.AllOccurrencesHandler$val nextOffset = VimPlugin.getSearch().search(editor, selectedText, 1, EnumSet.of(CommandFlags.FLAG_SEARCH_FWD), false)</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$if (nextOffset == -1 || patternComparator.compare(EditorHelper.getText(editor, nextOffset, nextOffset + pattern.length), pattern) != 0) { if (caretModel.caretCount > 1) return val newNextOffset = VimPlugin.getSearch().search(editor, pattern, 1, EnumSet.of(CommandFlags.FLAG_SEARCH_FWD), false) if (newNextOffset != -1) { val caret = editor.caretModel.addCaret(editor.offsetToVisualPosition(newNextOffset)) ?: return selectWord(caret, pattern, newNextOffset) } return }</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$val newNextOffset = VimPlugin.getSearch().search(editor, pattern, 1, EnumSet.of(CommandFlags.FLAG_SEARCH_FWD), false)</ID>
|
||||
<ID>MaxLineLength:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$val patternComparator = if (OptionsManager.ignorecase.isSet) String.CASE_INSENSITIVE_ORDER else Comparator(String::compareTo)</ID>
|
||||
<ID>MaxLineLength:VimSelection.kt$VimBlockSelection$val lineRange = if (logicalStart.line > logicalEnd.line) logicalEnd.line..logicalStart.line else logicalStart.line..logicalEnd.line</ID>
|
||||
<ID>MaxLineLength:VimSelection.kt$VimLineSelection$if (skipNewLineForLineMode && editor.document.textLength >= normNativeEnd && normNativeEnd > 0 && editor.document.text[normNativeEnd - 1] == '\n') { TextRange(normNativeStart, (normNativeEnd - 1).coerceAtLeast(0)) } else { TextRange(normNativeStart, normNativeEnd) }</ID>
|
||||
<ID>MaxLineLength:VimSelection.kt$VimSelection$return "Selection [$type]: vim start[offset: $vimStart : col ${startLogPosition.column} line ${startLogPosition.line}]" + " vim end[offset: $vimEnd : col ${endLogPosition.column} line ${endLogPosition.line}]"</ID>
|
||||
<ID>MaxLineLength:VimSelection.kt$VimSimpleSelection : VimSelection</ID>
|
||||
<ID>MaxLineLength:VimSelection.kt$VimSimpleSelection.Companion$ fun createWithNative(vimStart: Int, vimEnd: Int, nativeStart: Int, nativeEnd: Int, type: SelectionType, editor: Editor)</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))</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))</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>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)) .addAll(getKeyStrokes(KeyEvent.VK_END, 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)) .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))</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)) .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))</ID>
|
||||
<ID>MaxLineLength:VimShortcutKeyAction.kt$VimShortcutKeyAction.Companion$private fun getKeyStrokes(keyCode: Int, vararg modifiers: Int)</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension$putExtensionHandlerMapping(MappingMode.N, StringHelper.parseKeys("<Plug>CSurround"), owner, CSurroundHandler(), false)</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension$putExtensionHandlerMapping(MappingMode.N, StringHelper.parseKeys("<Plug>DSurround"), owner, DSurroundHandler(), false)</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension$putExtensionHandlerMapping(MappingMode.N, StringHelper.parseKeys("<Plug>YSurround"), owner, YSurroundHandler(), false)</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension$putExtensionHandlerMapping(MappingMode.XO, StringHelper.parseKeys("<Plug>VSurround"), owner, VSurroundHandler(), false)</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler.Companion$IdeaputDisabler().use { executeNormalWithoutMapping(StringHelper.parseKeys("\"" + REGISTER + sequence), editor) }</ID>
|
||||
<ID>MaxLineLength:VimSurroundExtension.kt$VimSurroundExtension.CSurroundHandler.Companion$private</ID>
|
||||
<ID>MaxLineLength:VisualGroup.kt$CommandState.Mode.COMMAND, CommandState.Mode.VISUAL, CommandState.Mode.REPLACE -> ChangeGroup.resetCaret(editor, false)</ID>
|
||||
<ID>MaxLineLength:VisualGroup.kt$fun blockToNativeSelection(editor: Editor, start: Int, end: Int, mode: CommandState.Mode): Pair<LogicalPosition, LogicalPosition></ID>
|
||||
<ID>MaxLineLength:VisualGroup.kt$val (start, end) = if (selectionStart > selectionEnd) selectionEnd to selectionStart else selectionStart to selectionEnd</ID>
|
||||
<ID>MaxLineLength:VisualGroup.kt$val adj = if (VimPlugin.getVisualMotion().exclusiveSelection || nativeEnd == lineEnd || mode == CommandState.Mode.SELECT) 0 else 1</ID>
|
||||
<ID>MaxLineLength:VisualMotionGroup.kt$VisualMotionGroup$if (project != null && FindManager.getInstance(project).selectNextOccurrenceWasPerformed()) return CommandState.SubMode.VISUAL_CHARACTER</ID>
|
||||
<ID>MaxLineLength:VisualMotionGroup.kt$VisualMotionGroup$lineStartOfSelectionStart == selectionStart && (lineEndOfSelectionEnd + 1 == selectionEnd || lineEndOfSelectionEnd == selectionEnd)</ID>
|
||||
<ID>MaxLineLength:VisualMotionGroup.kt$VisualMotionGroup$val lastColumn = if (range.columns == MotionGroup.LAST_COLUMN) MotionGroup.LAST_COLUMN else editor.offsetToLogicalPosition(end).column</ID>
|
||||
<ID>MaxLineLength:VisualOperationChange.kt$VisualOperation$SelectionType.CHARACTER_WISE -> if (lines > 1) ep.column - VimPlugin.getVisualMotion().selectionAdj else ep.column - sp.column</ID>
|
||||
<ID>MaxLineLength:VisualOperationChange.kt$VisualOperation$lines > 1 -> VimPlugin.getMotion().moveCaretToLineStart(editor, endLine) + min(EditorHelper.getLineLength(editor, endLine), chars)</ID>
|
||||
<ID>MaxLineLength:VisualOperatorActionHandler.kt$VisualOperatorActionHandler$selections.keys.size == 1 -> res.set(executeAction(editor, selections.keys.first(), context, cmd, selections.values.first()))</ID>
|
||||
<ID>MaxLineLength:VisualOperatorActionHandler.kt$VisualOperatorActionHandler.ForEachCaret$abstract</ID>
|
||||
<ID>MaxLineLength:VisualOperatorActionHandler.kt$VisualOperatorActionHandler.ForEachCaret$open</ID>
|
||||
<ID>MaxLineLength:VisualOperatorActionHandler.kt$VisualOperatorActionHandler.SingleExecution$abstract</ID>
|
||||
<ID>MaxLineLength:VisualOperatorActionHandler.kt$VisualOperatorActionHandler.VisualStartFinishWrapper$val change = if (this@VisualStartFinishWrapper.editor.inVisualMode && !this@VisualStartFinishWrapper.editor.inRepeatMode) { VisualOperation.getRange(this@VisualStartFinishWrapper.editor, it, this@VisualStartFinishWrapper.cmd.flags) } else null</ID>
|
||||
<ID>MaxLineLength:VisualSelectPreviousAction.kt$VisualSelectPreviousAction$override</ID>
|
||||
<ID>MaxLineLength:YankGroup.kt$YankGroup$range.endOffsets[i] = (EditorHelper.getLineEndForOffset(editor, range.endOffsets[i]) + 1).coerceAtMost(editor.fileSize)</ID>
|
||||
<ID>MaxLineLength:YankGroup.kt$YankGroup$val startOffsets = if (argument.motion.action is MotionDownLess1FirstNonSpaceAction) null else HashMap<Caret, Int>(caretModel.caretCount)</ID>
|
||||
<ID>MaxLineLength:YankVisualLinesAction.kt$YankVisualLinesAction$val selection = if (vimSelection.type == SelectionType.BLOCK_WISE) SelectionType.BLOCK_WISE else SelectionType.LINE_WISE</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:StatusBar.kt$StatusBarIconFactory$override fun isAvailable(project: Project): Boolean</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$ @Throws(ExException::class) fun process(editor: Editor, context: DataContext, cmd: ExCommand, count: Int): Boolean</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:VimExtensionFacade.kt$VimExtensionFacade$VimExtensionFacade</ID>
|
||||
<ID>TooManyFunctions:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
|
||||
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
@@ -59,12 +59,6 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
ideaselection when IDE sets a selection - IdeaVim ONLY
|
||||
(examples: extend selection, wrap with while, etc.)
|
||||
|
||||
Deprecated values:
|
||||
template ~~please use `idearefactormode` option~~
|
||||
when starting a template - IdeaVim ONLY
|
||||
refactoring ~~please use ideaselection~~
|
||||
same as ideaselection - IdeaVim ONLY
|
||||
|
||||
'showmode' 'smd' message on the status line to show current mode
|
||||
'showcmd' 'sc' show (partial) command in the status bar
|
||||
'sidescroll' 'ss' minimum number of columns to scroll horizontally
|
||||
@@ -104,12 +98,6 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
|
||||
If true, join command will be performed via IDE
|
||||
See wiki/`ideajoin` examples
|
||||
|
||||
`ideastatusbar` `ideastatusbar` Boolean (default true)
|
||||
DEPRECATED. Please use `ideastatusicon`
|
||||
|
||||
If false, IdeaVim icon won't be shown in the status bar.
|
||||
Works only from `~/.ideavimrc` after the IDE restart.
|
||||
|
||||
`ideastatusicon` `ideastatusicon` String(default "enabled")
|
||||
|
||||
@@ -136,6 +124,13 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
"<Tab>", "<Down>", "<Up>", "<Enter>", "<Left>", "<Right>",
|
||||
"<C-Down>", "<C-Up>", "<PageUp>", "<PageDown>",
|
||||
"<C-J>", "<C-Q>"
|
||||
|
||||
`ideaenabledbufs` `ideaenabledbufs` List of strings (default "dialog") [To Be Released]
|
||||
|
||||
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>
|
||||
|
@@ -64,5 +64,6 @@
|
||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.TabCloseHandler" names="tabc[lose]"/>
|
||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.BufferListHandler" names="buffers,ls,files"/>
|
||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.BufferHandler" names="b[uffer]"/>
|
||||
<vimExCommand implementation="com.maddyhome.idea.vim.ex.handler.PlugHandler" names="Plug[in]"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
@@ -1,12 +1,84 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="IdeaVIM">
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.textobjentire.VimTextObjEntireExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.argtextobj.VimArgTextObjExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.replacewithregister.ReplaceWithRegister"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.highlightedyank.VimHighlightedYank"/>
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.surround.VimSurroundExtension" name="surround">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tpope/vim-surround"/>
|
||||
<alias name="tpope/vim-surround"/>
|
||||
<alias name="vim-surround"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=1697"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.multiplecursors.VimMultipleCursorsExtension"
|
||||
name="multiple-cursors">
|
||||
<aliases>
|
||||
<alias name="https://github.com/terryma/vim-multiple-cursors"/>
|
||||
<alias name="terryma/vim-multiple-cursors"/>
|
||||
<alias name="vim-multiple-cursors"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.commentary.CommentaryExtension" name="commentary">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tpope/vim-commentary"/>
|
||||
<alias name="tpope/vim-commentary"/>
|
||||
<alias name="vim-commentary"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=3695"/>
|
||||
<alias name="https://github.com/tomtom/tcomment_vim"/>
|
||||
<alias name="tomtom/tcomment_vim"/>
|
||||
<alias name="tcomment_vim"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=1173"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.textobjentire.VimTextObjEntireExtension"
|
||||
name="textobj-entire">
|
||||
<aliases>
|
||||
<alias name="https://github.com/kana/vim-textobj-entire"/>
|
||||
<alias name="kana/vim-textobj-entire"/>
|
||||
<alias name="vim-textobj-entire"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2610"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.argtextobj.VimArgTextObjExtension"
|
||||
name="argtextobj">
|
||||
<aliases>
|
||||
<alias name="https://github.com/vim-scripts/argtextobj.vim"/>
|
||||
<alias name="vim-scripts/argtextobj.vim"/>
|
||||
<alias name="argtextobj.vim"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2699"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.replacewithregister.ReplaceWithRegister"
|
||||
name="ReplaceWithRegister">
|
||||
<aliases>
|
||||
<alias name="https://github.com/vim-scripts/ReplaceWithRegister"/>
|
||||
<alias name="vim-scripts/ReplaceWithRegister"/>
|
||||
<alias name="ReplaceWithRegister"/>
|
||||
<alias name="https://github.com/inkarkat/vim-ReplaceWithRegister"/>
|
||||
<alias name="inkarkat/vim-ReplaceWithRegister"/>
|
||||
<alias name="vim-ReplaceWithRegister"/>
|
||||
<alias name="https://www.vim.org/scripts/script.php?script_id=2703"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.exchange.VimExchangeExtension" name="exchange">
|
||||
<aliases>
|
||||
<alias name="https://github.com/tommcdo/vim-exchange"/>
|
||||
<alias name="tommcdo/vim-exchange"/>
|
||||
<alias name="vim-exchange"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
|
||||
<vimExtension implementation="com.maddyhome.idea.vim.extension.highlightedyank.VimHighlightedYank"
|
||||
name="highlightedyank">
|
||||
<aliases>
|
||||
<alias name="https://github.com/machakann/vim-highlightedyank"/>
|
||||
<alias name="machakann/vim-highlightedyank"/>
|
||||
<alias name="vim-highlightedyank"/>
|
||||
</aliases>
|
||||
</vimExtension>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
@@ -2,6 +2,8 @@
|
||||
<applicationListeners>
|
||||
<listener class="com.maddyhome.idea.vim.ui.ExEntryPanel$LafListener"
|
||||
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||
<listener class="com.maddyhome.idea.vim.extension.highlightedyank.HighlightColorResetter"
|
||||
topic="com.intellij.ide.ui.LafManagerListener"/>
|
||||
</applicationListeners>
|
||||
<projectListeners>
|
||||
<listener class="com.maddyhome.idea.vim.ui.ExOutputPanel$LafListener"
|
||||
|
@@ -3,9 +3,11 @@
|
||||
<id>IdeaVIM</id>
|
||||
<change-notes><![CDATA[
|
||||
<ul>
|
||||
<li>Fix ESC in dialogs</li>
|
||||
<li>Add option to disable IdeaVim in dialogs and single line editors</li>
|
||||
<li>Ability to map IDE actions via the <Action> keyword.</li>
|
||||
<li>"IdeaVim: track action Ids" command to find action ids for the :action command.
|
||||
Enable this option in "Search everywhere" (double shift).</li>
|
||||
<li>Add new option to register IdeaVim extensions. Please read the changelog for details</li>
|
||||
</ul>
|
||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||
]]></change-notes>
|
||||
@@ -36,7 +38,10 @@
|
||||
</application-components>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="vimExtension" interface="com.maddyhome.idea.vim.extension.VimExtension" dynamic="true"/>
|
||||
<extensionPoint name="vimExtension" beanClass="com.maddyhome.idea.vim.extension.ExtensionBeanClass" dynamic="true">
|
||||
<with attribute="implementation" implements="com.maddyhome.idea.vim.extension.VimExtension"/>
|
||||
|
||||
</extensionPoint>
|
||||
|
||||
<!-- For internal use only -->
|
||||
<extensionPoint name="vimExCommand" beanClass="com.maddyhome.idea.vim.ex.ExBeanClass" dynamic="true">
|
||||
|
BIN
resources/contributing/configurations.png
Normal file
BIN
resources/contributing/configurations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@@ -24,10 +24,7 @@ import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.components.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.keymap.Keymap;
|
||||
|
@@ -39,6 +39,7 @@ import com.maddyhome.idea.vim.helper.inInsertMode
|
||||
import com.maddyhome.idea.vim.helper.inNormalMode
|
||||
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||
import com.maddyhome.idea.vim.helper.isPrimaryEditor
|
||||
import com.maddyhome.idea.vim.helper.isTemplateActive
|
||||
import com.maddyhome.idea.vim.key.ShortcutOwner
|
||||
import com.maddyhome.idea.vim.listener.IdeaSpecifics.aceJumpActive
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
@@ -96,6 +97,8 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
|
||||
if (keyCode == KeyEvent.VK_ESCAPE) return isEnabledForEscape(editor)
|
||||
|
||||
if (keyCode == KeyEvent.VK_TAB && editor.isTemplateActive()) return false
|
||||
|
||||
if (editor.inInsertMode) { // XXX: <Tab> won't be recorded in macros
|
||||
if (keyCode == KeyEvent.VK_TAB) {
|
||||
VimPlugin.getChange().tabAction = true
|
||||
@@ -125,7 +128,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
private fun isEnabledForEscape(editor: Editor): Boolean {
|
||||
return editor.isPrimaryEditor()
|
||||
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||
|| OptionsManager.dialogescape.value == "on" && !editor.inNormalMode
|
||||
|| OptionsManager.ideaenabledbufs.contains("dialog") && !editor.inNormalMode
|
||||
}
|
||||
|
||||
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
||||
|
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -31,14 +33,16 @@ import java.util.*
|
||||
class ChangeCharactersAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
return VimPlugin.getChange().changeCharacters(editor, caret, count)
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -31,7 +33,7 @@ import java.util.*
|
||||
class ChangeEndOfLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -25,6 +25,8 @@ import com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceA
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_NO_REPEAT_INSERT
|
||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
@@ -32,14 +34,16 @@ import java.util.*
|
||||
class ChangeLineAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_NO_REPEAT_INSERT, CommandFlags.FLAG_MULTIKEY_UNDO)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_NO_REPEAT_INSERT, FLAG_MULTIKEY_UNDO)
|
||||
|
||||
override fun execute(editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?): Boolean {
|
||||
override fun execute(
|
||||
editor: Editor,
|
||||
caret: Caret,
|
||||
context: DataContext,
|
||||
count: Int,
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
// `S` command is a synonym of `cc`
|
||||
val motion = MotionDownLess1FirstNonSpaceAction()
|
||||
val command = Command(1, motion, motion.type, motion.flags)
|
||||
|
@@ -23,6 +23,9 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_EXIT_VISUAL
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MOT_LINEWISE
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
@@ -37,7 +40,7 @@ import java.util.*
|
||||
class ChangeVisualLinesAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, FLAG_EXIT_VISUAL)
|
||||
|
||||
override fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -23,6 +23,9 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_EXIT_VISUAL
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MOT_LINEWISE
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_MULTIKEY_UNDO
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
@@ -37,7 +40,7 @@ import java.util.*
|
||||
class ChangeVisualLinesEndAction : VisualOperatorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_MOT_LINEWISE, CommandFlags.FLAG_MULTIKEY_UNDO, CommandFlags.FLAG_EXIT_VISUAL)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_MOT_LINEWISE, FLAG_MULTIKEY_UNDO, FLAG_EXIT_VISUAL)
|
||||
|
||||
override fun executeAction(editor: Editor,
|
||||
caret: Caret,
|
||||
|
@@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.util.*
|
||||
|
||||
sealed class IncNumber(val inc: Int, val avalanche: Boolean) : VisualOperatorActionHandler.ForEachCaret() {
|
||||
sealed class IncNumber(val inc: Int, private val avalanche: Boolean) : VisualOperatorActionHandler.ForEachCaret() {
|
||||
override val type: Command.Type = Command.Type.CHANGE
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_EXIT_VISUAL)
|
||||
|
||||
|
@@ -10,7 +10,7 @@ import javax.swing.KeyStroke
|
||||
|
||||
class InsertCompletedDigraphAction : VimActionHandler.SingleExecution() {
|
||||
override val type: Command.Type = Command.Type.INSERT
|
||||
override val argumentType: Argument.Type? = Argument.Type.DIGRAPH
|
||||
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
// The converted digraph character has been captured as an argument, push it back through key handler
|
||||
|
@@ -10,7 +10,7 @@ import javax.swing.KeyStroke
|
||||
|
||||
class InsertCompletedLiteralAction : VimActionHandler.SingleExecution() {
|
||||
override val type: Command.Type = Command.Type.INSERT
|
||||
override val argumentType: Argument.Type? = Argument.Type.DIGRAPH
|
||||
override val argumentType: Argument.Type = Argument.Type.DIGRAPH
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
// The converted literal character has been captured as an argument, push it back through key handler
|
||||
|
@@ -37,7 +37,7 @@ class MotionInnerSentenceAction : TextObjectActionHandler() {
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getSentenceRange(editor, caret, count, false)
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ class MotionInnerWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getWordRange(editor, caret, count, false, false)
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class MotionOuterBigWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getWordRange(editor, caret, count, true, true)
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ class MotionOuterSentenceAction : TextObjectActionHandler() {
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getSentenceRange(editor, caret, count, true)
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class MotionOuterWordAction : TextObjectActionHandler() {
|
||||
|
||||
override val visualType: TextObjectVisualType = TextObjectVisualType.CHARACTER_WISE
|
||||
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange? {
|
||||
override fun getRange(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): TextRange {
|
||||
return VimPlugin.getMotion().getWordRange(editor, caret, count, true, false)
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.action.ComplicatedKeysAction
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_CLEAR_STROKES
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_IGNORE_SCROLL_JUMP
|
||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.awt.event.KeyEvent
|
||||
@@ -35,7 +37,7 @@ class MotionScrollPageDownAction : VimActionHandler.SingleExecution() {
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_IGNORE_SCROLL_JUMP)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
return VimPlugin.getMotion().scrollFullPage(editor, cmd.count)
|
||||
@@ -52,7 +54,7 @@ class MotionScrollPageDownInsertModeAction : VimActionHandler.SingleExecution(),
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP, CommandFlags.FLAG_CLEAR_STROKES)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_IGNORE_SCROLL_JUMP, FLAG_CLEAR_STROKES)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
return VimPlugin.getMotion().scrollFullPage(editor, cmd.count)
|
||||
|
@@ -24,6 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.action.ComplicatedKeysAction
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_CLEAR_STROKES
|
||||
import com.maddyhome.idea.vim.command.CommandFlags.FLAG_IGNORE_SCROLL_JUMP
|
||||
import com.maddyhome.idea.vim.handler.VimActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import java.awt.event.KeyEvent
|
||||
@@ -35,7 +37,7 @@ class MotionScrollPageUpAction : VimActionHandler.SingleExecution() {
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_IGNORE_SCROLL_JUMP)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
return VimPlugin.getMotion().scrollFullPage(editor, -cmd.count)
|
||||
@@ -52,7 +54,7 @@ class MotionScrollPageUpInsertModeAction : VimActionHandler.SingleExecution(), C
|
||||
|
||||
override val type: Command.Type = Command.Type.OTHER_READONLY
|
||||
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(CommandFlags.FLAG_IGNORE_SCROLL_JUMP, CommandFlags.FLAG_CLEAR_STROKES)
|
||||
override val flags: EnumSet<CommandFlags> = enumSetOf(FLAG_IGNORE_SCROLL_JUMP, FLAG_CLEAR_STROKES)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
return VimPlugin.getMotion().scrollFullPage(editor, -cmd.count)
|
||||
|
@@ -42,12 +42,12 @@ class SelectMotionLeftAction : MotionActionHandler.ForEachCaret() {
|
||||
override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int {
|
||||
val keymodel = OptionsManager.keymodel
|
||||
if (KeyModelOptionData.stopsel in keymodel || KeyModelOptionData.stopselect in keymodel) {
|
||||
logger.info("Keymodel option has stopselect. Exiting select mode")
|
||||
logger.debug("Keymodel option has stopselect. Exiting select mode")
|
||||
val startSelection = caret.selectionStart
|
||||
val endSelection = caret.selectionEnd
|
||||
editor.exitSelectMode(false)
|
||||
if (editor.isTemplateActive()) {
|
||||
logger.info("Template is active. Activate insert mode")
|
||||
logger.debug("Template is active. Activate insert mode")
|
||||
VimPlugin.getChange().insertBeforeCursor(editor, context)
|
||||
if (caret.offset in startSelection..endSelection) {
|
||||
return startSelection
|
||||
|
@@ -42,12 +42,12 @@ class SelectMotionRightAction : MotionActionHandler.ForEachCaret() {
|
||||
override fun getOffset(editor: Editor, caret: Caret, context: DataContext, count: Int, rawCount: Int, argument: Argument?): Int {
|
||||
val keymodel = OptionsManager.keymodel
|
||||
if (KeyModelOptionData.stopsel in keymodel || KeyModelOptionData.stopselect in keymodel) {
|
||||
logger.info("Keymodel option has stopselect. Exiting select mode")
|
||||
logger.debug("Keymodel option has stopselect. Exiting select mode")
|
||||
val startSelection = caret.selectionStart
|
||||
val endSelection = caret.selectionEnd
|
||||
editor.exitSelectMode(false)
|
||||
if (editor.isTemplateActive()) {
|
||||
logger.info("Template is active. Activate insert mode")
|
||||
logger.debug("Template is active. Activate insert mode")
|
||||
VimPlugin.getChange().insertBeforeCursor(editor, context)
|
||||
if (caret.offset in startSelection..endSelection) {
|
||||
return endSelection
|
||||
|
@@ -27,7 +27,6 @@ import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||
import com.maddyhome.idea.vim.helper.vimCommandState
|
||||
import com.maddyhome.idea.vim.key.CommandPartNode
|
||||
import com.maddyhome.idea.vim.option.OptionsManager.showmode
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.Contract
|
||||
import java.util.*
|
||||
import javax.swing.KeyStroke
|
||||
@@ -60,12 +59,6 @@ class CommandState private constructor() {
|
||||
var executingCommand: Command? = null
|
||||
private set
|
||||
|
||||
// Keep the compatibility with the IdeaVim-EasyMotion plugin before the stable release
|
||||
@get:Deprecated("")
|
||||
@get:ApiStatus.ScheduledForRemoval(inVersion = "0.58")
|
||||
val mappingMode: MappingMode
|
||||
get() = mappingState.mappingMode
|
||||
|
||||
val isOperatorPending: Boolean
|
||||
get() = mappingState.mappingMode == MappingMode.OP_PENDING && !commandBuilder.isEmpty
|
||||
|
||||
@@ -82,7 +75,7 @@ class CommandState private constructor() {
|
||||
|
||||
fun pushModes(mode: Mode, submode: SubMode) {
|
||||
val newModeState = ModeState(mode, submode)
|
||||
logger.info("Push new mode state: ${newModeState.toSimpleString()}")
|
||||
logger.debug("Push new mode state: ${newModeState.toSimpleString()}")
|
||||
logger.debug { "Stack of mode states before push: ${toSimpleString()}" }
|
||||
modeStates.push(newModeState)
|
||||
setMappingMode()
|
||||
@@ -93,7 +86,7 @@ class CommandState private constructor() {
|
||||
val popped = modeStates.pop()
|
||||
setMappingMode()
|
||||
updateStatus()
|
||||
logger.info("Popped mode state: ${popped.toSimpleString()}")
|
||||
logger.debug("Popped mode state: ${popped.toSimpleString()}")
|
||||
logger.debug { "Stack of mode states after pop: ${toSimpleString()}" }
|
||||
}
|
||||
|
||||
|
@@ -121,31 +121,8 @@ sealed class CommandHandler {
|
||||
@Throws(ExException::class)
|
||||
fun process(editor: Editor, context: DataContext, cmd: ExCommand, count: Int): Boolean {
|
||||
|
||||
// No range allowed
|
||||
if (RangeFlag.RANGE_FORBIDDEN == argFlags.rangeFlag && cmd.ranges.size() != 0) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_norange))
|
||||
throw NoRangeAllowedException()
|
||||
}
|
||||
checkArgs(cmd)
|
||||
|
||||
if (RangeFlag.RANGE_REQUIRED == argFlags.rangeFlag && cmd.ranges.size() == 0) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_rangereq))
|
||||
throw MissingRangeException()
|
||||
}
|
||||
|
||||
if (RangeFlag.RANGE_IS_COUNT == argFlags.rangeFlag) {
|
||||
cmd.ranges.setDefaultLine(1)
|
||||
}
|
||||
|
||||
// Argument required
|
||||
if (ArgumentFlag.ARGUMENT_REQUIRED == argFlags.argumentFlag && cmd.argument.isEmpty()) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_argreq))
|
||||
throw MissingArgumentException()
|
||||
}
|
||||
|
||||
if (ArgumentFlag.ARGUMENT_FORBIDDEN == argFlags.argumentFlag && cmd.argument.isNotEmpty()) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_argforb))
|
||||
throw NoArgumentAllowedException()
|
||||
}
|
||||
if (editor.inVisualMode && Flag.SAVE_VISUAL !in argFlags.flags) {
|
||||
editor.exitVisualMode()
|
||||
}
|
||||
@@ -179,6 +156,34 @@ sealed class CommandHandler {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkArgs(cmd: ExCommand) {
|
||||
// No range allowed
|
||||
if (RangeFlag.RANGE_FORBIDDEN == argFlags.rangeFlag && cmd.ranges.size() != 0) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_norange))
|
||||
throw NoRangeAllowedException()
|
||||
}
|
||||
|
||||
if (RangeFlag.RANGE_REQUIRED == argFlags.rangeFlag && cmd.ranges.size() == 0) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_rangereq))
|
||||
throw MissingRangeException()
|
||||
}
|
||||
|
||||
if (RangeFlag.RANGE_IS_COUNT == argFlags.rangeFlag) {
|
||||
cmd.ranges.setDefaultLine(1)
|
||||
}
|
||||
|
||||
// Argument required
|
||||
if (ArgumentFlag.ARGUMENT_REQUIRED == argFlags.argumentFlag && cmd.argument.isEmpty()) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_argreq))
|
||||
throw MissingArgumentException()
|
||||
}
|
||||
|
||||
if (ArgumentFlag.ARGUMENT_FORBIDDEN == argFlags.argumentFlag && cmd.argument.isNotEmpty()) {
|
||||
VimPlugin.showMessage(MessageHelper.message(Msg.e_argforb))
|
||||
throw NoArgumentAllowedException()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data class CommandHandlerFlags(
|
||||
|
@@ -126,7 +126,6 @@ public class CommandParser {
|
||||
private void processCommand(@NotNull Editor editor, @NotNull DataContext context, @NotNull String cmd,
|
||||
int count, int aliasCountdown) throws ExException {
|
||||
// Nothing entered
|
||||
int result = 0;
|
||||
if (cmd.length() == 0) {
|
||||
logger.warn("CMD is empty");
|
||||
return;
|
||||
@@ -326,13 +325,12 @@ public class CommandParser {
|
||||
if (ch == '/' || ch == '?' || ch == '&') {
|
||||
location.append(ch);
|
||||
state = State.RANGE_PATTERN_MAYBE_DONE;
|
||||
reprocess = false;
|
||||
}
|
||||
else {
|
||||
error = MessageHelper.message(Msg.e_backslash);
|
||||
state = State.ERROR;
|
||||
reprocess = false;
|
||||
}
|
||||
reprocess = false;
|
||||
break;
|
||||
case RANGE_PATTERN: // Reading a pattern range
|
||||
// No trailing / or ? required if there is no command so look for newline to tell us we are done
|
||||
|
@@ -26,7 +26,10 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.KeyHandler
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Flag.SAVE_VISUAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
@@ -37,7 +40,7 @@ import com.maddyhome.idea.vim.helper.runAfterGotFocus
|
||||
*/
|
||||
class ActionHandler : CommandHandler.SingleExecution() {
|
||||
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY, SAVE_VISUAL)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_OPTIONAL, ARGUMENT_OPTIONAL, READ_ONLY, SAVE_VISUAL)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val actionName = cmd.argument.trim()
|
||||
|
@@ -23,6 +23,9 @@ import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.actionSystem.KeyboardShortcut
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.ExOutputModel
|
||||
@@ -33,7 +36,7 @@ import com.maddyhome.idea.vim.helper.StringHelper
|
||||
* @author smartbomb
|
||||
*/
|
||||
class ActionListHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_FORBIDDEN, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val lineSeparator = "\n"
|
||||
|
@@ -22,12 +22,15 @@ import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
|
||||
class AsciiHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_FORBIDDEN, ARGUMENT_FORBIDDEN, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
VimPlugin.getDigraph().displayAsciiInfo(editor)
|
||||
|
@@ -22,12 +22,15 @@ import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
|
||||
class CmdClearHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_FORBIDDEN, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_FORBIDDEN, ARGUMENT_FORBIDDEN, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
VimPlugin.getCommand().resetAliases()
|
||||
|
@@ -34,7 +34,7 @@ import java.io.IOException
|
||||
class CmdFilterHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
logger.info("execute")
|
||||
logger.debug("execute")
|
||||
|
||||
var command = cmd.argument
|
||||
if (command.isEmpty()) {
|
||||
|
@@ -23,6 +23,9 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.common.Alias
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.ExOutputModel
|
||||
@@ -34,7 +37,7 @@ import com.maddyhome.idea.vim.group.CommandGroup.Companion.BLACKLISTED_ALIASES
|
||||
* @author Elliot Courant
|
||||
*/
|
||||
class CmdHandler : CommandHandler.SingleExecution(), VimScriptCommandHandler {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_FORBIDDEN, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_FORBIDDEN, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
// Static definitions needed for aliases.
|
||||
private companion object {
|
||||
|
@@ -23,13 +23,16 @@ import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_IS_COUNT
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
|
||||
class GotoCharacterHandler : CommandHandler.ForEachCaret() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_IS_COUNT, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_IS_COUNT, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val count = cmd.getCount(editor, caret, 1, true)
|
||||
|
@@ -23,6 +23,9 @@ import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_REQUIRED
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
@@ -35,7 +38,7 @@ import kotlin.math.min
|
||||
* range.
|
||||
*/
|
||||
class GotoLineHandler : CommandHandler.ForEachCaret() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_REQUIRED, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_REQUIRED, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
/**
|
||||
* Moves the cursor to the line entered by the user
|
||||
|
@@ -22,6 +22,9 @@ import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.ExOutputModel
|
||||
@@ -31,7 +34,7 @@ import com.maddyhome.idea.vim.helper.StringHelper.stringToKeys
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.toPrintableCharacters
|
||||
|
||||
class MarksHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_OPTIONAL, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
|
||||
|
@@ -22,12 +22,15 @@ import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
|
||||
class OnlyHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.READ_ONLY)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_OPTIONAL, ARGUMENT_OPTIONAL, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
VimPlugin.getWindow().closeAllExceptCurrent(context)
|
||||
|
56
src/com/maddyhome/idea/vim/ex/handler/PlugHandler.kt
Normal file
56
src/com/maddyhome/idea/vim/ex/handler/PlugHandler.kt
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.ex.handler
|
||||
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.READ_ONLY
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_REQUIRED
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_FORBIDDEN
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.ExCommand
|
||||
import com.maddyhome.idea.vim.ex.flags
|
||||
import com.maddyhome.idea.vim.ex.vimscript.VimScriptCommandHandler
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionRegistrar
|
||||
|
||||
/**
|
||||
* This handler is created to support `Plug` command from vim-plug and `Plugin` command from vundle.
|
||||
*/
|
||||
class PlugHandler : CommandHandler.SingleExecution(), VimScriptCommandHandler {
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_FORBIDDEN, ARGUMENT_REQUIRED, READ_ONLY)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean = doExecute(cmd)
|
||||
|
||||
override fun execute(cmd: ExCommand) {
|
||||
doExecute(cmd)
|
||||
}
|
||||
|
||||
private fun doExecute(cmd: ExCommand): Boolean {
|
||||
val argument = cmd.argument
|
||||
val firstChar = argument[0]
|
||||
if (firstChar != '"' && firstChar != '\'') return false
|
||||
|
||||
val pluginAlias = argument.drop(1).takeWhile { it != firstChar }
|
||||
val option = VimExtensionRegistrar.getToggleByAlias(pluginAlias) ?: return false
|
||||
option.set()
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
@@ -24,6 +24,9 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.WRITABLE
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.CommandName
|
||||
import com.maddyhome.idea.vim.ex.ComplicatedNameExCommand
|
||||
@@ -33,7 +36,7 @@ import com.maddyhome.idea.vim.ex.flags
|
||||
|
||||
class ShiftLeftHandler : CommandHandler.ForEachCaret(), ComplicatedNameExCommand {
|
||||
override val names: Array<CommandName> = commands("<[${"<".repeat(31)}]")
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_OPTIONAL, ARGUMENT_OPTIONAL, WRITABLE)
|
||||
|
||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val range = cmd.getTextRange(editor, caret, true)
|
||||
|
@@ -24,6 +24,9 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.common.TextRange
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.Access.WRITABLE
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.ArgumentFlag.ARGUMENT_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandler.RangeFlag.RANGE_OPTIONAL
|
||||
import com.maddyhome.idea.vim.ex.CommandHandlerFlags
|
||||
import com.maddyhome.idea.vim.ex.CommandName
|
||||
import com.maddyhome.idea.vim.ex.ComplicatedNameExCommand
|
||||
@@ -33,7 +36,7 @@ import com.maddyhome.idea.vim.ex.flags
|
||||
|
||||
class ShiftRightHandler : CommandHandler.ForEachCaret(), ComplicatedNameExCommand {
|
||||
override val names: Array<CommandName> = commands(">[${">".repeat(31)}]")
|
||||
override val argFlags: CommandHandlerFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_OPTIONAL, Access.WRITABLE)
|
||||
override val argFlags: CommandHandlerFlags = flags(RANGE_OPTIONAL, ARGUMENT_OPTIONAL, WRITABLE)
|
||||
|
||||
override fun execute(editor: Editor, caret: Caret, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val range = cmd.getTextRange(editor, caret, true)
|
||||
|
@@ -95,6 +95,10 @@ object VimScriptParser {
|
||||
return data
|
||||
}
|
||||
|
||||
fun executeText(vararg text: String) {
|
||||
executeText(listOf(*text))
|
||||
}
|
||||
|
||||
fun executeText(text: List<String>) {
|
||||
for (line in text) {
|
||||
// TODO: Build a proper parse tree for a VimL file instead of ignoring potentially nested lines (VIM-669)
|
||||
|
64
src/com/maddyhome/idea/vim/extension/ExtensionBeanClass.kt
Normal file
64
src/com/maddyhome/idea/vim/extension/ExtensionBeanClass.kt
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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.extension
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.extensions.AbstractExtensionPointBean
|
||||
import com.intellij.util.xmlb.annotations.Attribute
|
||||
import com.intellij.util.xmlb.annotations.CollectionBean
|
||||
import com.intellij.util.xmlb.annotations.Tag
|
||||
import com.intellij.util.xmlb.annotations.XCollection
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
// [Version Update] 202+
|
||||
@Suppress("DEPRECATION")
|
||||
class ExtensionBeanClass : AbstractExtensionPointBean() {
|
||||
init {
|
||||
println()
|
||||
}
|
||||
@Attribute("implementation")
|
||||
var implementation: String? = null
|
||||
|
||||
@Attribute("name")
|
||||
var name: String? = null
|
||||
|
||||
/**
|
||||
* List of aliases for the extension. These aliases are used to support `Plug` and `Plugin` commands.
|
||||
* Technically, it would be enough to save here github link and short version of it ('author/plugin'),
|
||||
* but it may contain more aliases just in case.
|
||||
*/
|
||||
@Tag("aliases")
|
||||
@XCollection
|
||||
var aliases: List<Alias>? = null
|
||||
|
||||
var initialized = AtomicBoolean(false)
|
||||
|
||||
val handler: VimExtension by lazy {
|
||||
initialized.set(true)
|
||||
this.instantiateClass<VimExtension>(
|
||||
implementation ?: "", ApplicationManager.getApplication().picoContainer
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Tag("alias")
|
||||
class Alias {
|
||||
@Attribute("name")
|
||||
var name: String? = null
|
||||
}
|
@@ -21,16 +21,21 @@ package com.maddyhome.idea.vim.extension;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.maddyhome.idea.vim.VimPlugin;
|
||||
import com.maddyhome.idea.vim.key.MappingOwner;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author vlan
|
||||
*/
|
||||
public interface VimExtension {
|
||||
@NotNull ExtensionPointName<VimExtension> EP_NAME = ExtensionPointName.create("IdeaVIM.vimExtension");
|
||||
@NotNull ExtensionPointName<ExtensionBeanClass> EP_NAME = ExtensionPointName.create("IdeaVIM.vimExtension");
|
||||
|
||||
@NotNull
|
||||
String getName();
|
||||
/**
|
||||
* @deprecated Please set extension name in <vimExtension> tag
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "0.63")
|
||||
@NotNull String getName();
|
||||
|
||||
default MappingOwner getOwner() {
|
||||
return MappingOwner.Plugin.Companion.get(getName());
|
||||
@@ -40,5 +45,5 @@ public interface VimExtension {
|
||||
|
||||
default void dispose() {
|
||||
VimPlugin.getKey().removeKeyMapping(getOwner());
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,6 @@ import com.maddyhome.idea.vim.key.MappingOwner
|
||||
import com.maddyhome.idea.vim.key.OperatorFunction
|
||||
import com.maddyhome.idea.vim.ui.ExEntryPanel
|
||||
import com.maddyhome.idea.vim.ui.ModalEntry
|
||||
import org.jetbrains.annotations.ApiStatus.ScheduledForRemoval
|
||||
import java.awt.event.KeyEvent
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
@@ -44,22 +43,6 @@ import javax.swing.KeyStroke
|
||||
* @author vlan
|
||||
*/
|
||||
object VimExtensionFacade {
|
||||
/** The 'map' command for mapping keys to handlers defined in extensions. */
|
||||
@JvmStatic
|
||||
@ScheduledForRemoval(inVersion = "0.58")
|
||||
@Deprecated("Only for EasyMotion support")
|
||||
fun putExtensionHandlerMapping(modes: Set<MappingMode>, fromKeys: List<KeyStroke>, extensionHandler: VimExtensionHandler, recursive: Boolean) {
|
||||
VimPlugin.getKey().putKeyMapping(modes, fromKeys, MappingOwner.Plugin.get("easymotion"), extensionHandler, recursive)
|
||||
}
|
||||
|
||||
@ScheduledForRemoval(inVersion = "0.58")
|
||||
@Deprecated("Only for EasyMotion support")
|
||||
@JvmStatic
|
||||
fun putKeyMapping(modes: Set<MappingMode>, fromKeys: List<KeyStroke>,
|
||||
toKeys: List<KeyStroke>, recursive: Boolean) {
|
||||
VimPlugin.getKey().putKeyMapping(modes, fromKeys, MappingOwner.Plugin.get("easymotion"), toKeys, recursive)
|
||||
}
|
||||
|
||||
/** The 'map' command for mapping keys to handlers defined in extensions. */
|
||||
@JvmStatic
|
||||
fun putExtensionHandlerMapping(modes: Set<MappingMode>, fromKeys: List<KeyStroke>,
|
||||
|
@@ -22,14 +22,15 @@ import com.intellij.openapi.extensions.ExtensionPointListener
|
||||
import com.intellij.openapi.extensions.PluginDescriptor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.key.MappingOwner.Plugin.Companion.remove
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
import com.maddyhome.idea.vim.option.OptionsManager.addOption
|
||||
import com.maddyhome.idea.vim.option.OptionsManager.isSet
|
||||
import com.maddyhome.idea.vim.option.OptionsManager.removeOption
|
||||
import com.maddyhome.idea.vim.option.ToggleOption
|
||||
import java.util.*
|
||||
|
||||
object VimExtensionRegistrar {
|
||||
private val registeredExtensions: MutableSet<String> = HashSet()
|
||||
private val extensionAliases = HashMap<String, String>()
|
||||
private var extensionRegistered = false
|
||||
private val logger = logger<VimExtensionRegistrar>()
|
||||
|
||||
@@ -37,48 +38,67 @@ object VimExtensionRegistrar {
|
||||
fun registerExtensions() {
|
||||
if (extensionRegistered) return
|
||||
extensionRegistered = true
|
||||
|
||||
VimExtension.EP_NAME.extensions.forEach(this::registerExtension)
|
||||
|
||||
// [VERSION UPDATE] 202+
|
||||
@Suppress("DEPRECATION")
|
||||
VimExtension.EP_NAME.getPoint(null).addExtensionPointListener(object : ExtensionPointListener<VimExtension> {
|
||||
override fun extensionAdded(extension: VimExtension, pluginDescriptor: PluginDescriptor) {
|
||||
VimExtension.EP_NAME.getPoint(null).addExtensionPointListener(object : ExtensionPointListener<ExtensionBeanClass> {
|
||||
override fun extensionAdded(extension: ExtensionBeanClass, pluginDescriptor: PluginDescriptor) {
|
||||
registerExtension(extension)
|
||||
}
|
||||
|
||||
override fun extensionRemoved(extension: VimExtension, pluginDescriptor: PluginDescriptor) {
|
||||
override fun extensionRemoved(extension: ExtensionBeanClass, pluginDescriptor: PluginDescriptor) {
|
||||
unregisterExtension(extension)
|
||||
}
|
||||
}, true, VimPlugin.getInstance())
|
||||
}, false, VimPlugin.getInstance())
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun registerExtension(extension: VimExtension) {
|
||||
val name = extension.name
|
||||
private fun registerExtension(extensionBean: ExtensionBeanClass) {
|
||||
val name = extensionBean.name ?: extensionBean.handler.name
|
||||
if (name in registeredExtensions) return
|
||||
|
||||
registeredExtensions.add(name)
|
||||
registerAliases(extensionBean)
|
||||
val option = ToggleOption(name, name, false)
|
||||
option.addOptionChangeListener { _, _ ->
|
||||
for (extensionInListener in VimExtension.EP_NAME.extensionList) {
|
||||
if (name != extensionInListener.name) continue
|
||||
if (isSet(name)) {
|
||||
extensionInListener.init()
|
||||
logger.info("IdeaVim extension '$name' initialized")
|
||||
} else {
|
||||
extensionInListener.dispose()
|
||||
}
|
||||
if (isSet(name)) {
|
||||
extensionBean.handler.init()
|
||||
logger.info("IdeaVim extension '$name' initialized")
|
||||
} else {
|
||||
extensionBean.handler.dispose()
|
||||
}
|
||||
}
|
||||
addOption(option)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun unregisterExtension(extension: VimExtension) {
|
||||
val name = extension.name
|
||||
private fun unregisterExtension(extension: ExtensionBeanClass) {
|
||||
val name = extension.name ?: extension.handler.name
|
||||
if (name !in registeredExtensions) return
|
||||
registeredExtensions.remove(name)
|
||||
extension.dispose()
|
||||
removeAliases(extension)
|
||||
if (extension.initialized.get()) {
|
||||
extension.handler.dispose()
|
||||
}
|
||||
removeOption(name)
|
||||
remove(name)
|
||||
logger.info("IdeaVim extension '$name' disposed")
|
||||
}
|
||||
|
||||
fun getToggleByAlias(alias: String): ToggleOption? {
|
||||
val name = extensionAliases[alias] ?: return null
|
||||
return OptionsManager.getOption(name) as ToggleOption?
|
||||
}
|
||||
|
||||
private fun registerAliases(extension: ExtensionBeanClass) {
|
||||
extension.aliases
|
||||
?.mapNotNull { it.name }
|
||||
?.forEach { alias -> extensionAliases[alias] = extension.name ?: extension.handler.name }
|
||||
}
|
||||
|
||||
private fun removeAliases(extension: ExtensionBeanClass) {
|
||||
extension.aliases?.mapNotNull { it.name }?.forEach { extensionAliases.remove(it) }
|
||||
}
|
||||
}
|
||||
|
@@ -17,8 +17,7 @@ import com.maddyhome.idea.vim.listener.VimListenerSuppressor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Stack;
|
||||
import java.util.*;
|
||||
|
||||
import static com.maddyhome.idea.vim.extension.VimExtensionFacade.putExtensionHandlerMapping;
|
||||
import static com.maddyhome.idea.vim.extension.VimExtensionFacade.putKeyMapping;
|
||||
@@ -50,13 +49,13 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
/**
|
||||
* The pairs of brackets that delimit different types of argument lists.
|
||||
*/
|
||||
static private class BracketPairs {
|
||||
private static class BracketPairs {
|
||||
// NOTE: brackets must match by the position, and ordered by rank (highest to lowest).
|
||||
@NotNull private final String openBrackets;
|
||||
@NotNull private final String closeBrackets;
|
||||
|
||||
static class ParseError extends Exception {
|
||||
public ParseError(@NotNull String message) {
|
||||
static class ParseException extends Exception {
|
||||
public ParseException(@NotNull String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -73,10 +72,10 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
* as VIM's @c matchpairs option: "(:),{:},[:]"
|
||||
*
|
||||
* @param bracketPairs comma-separated list of colon-separated bracket pairs.
|
||||
* @throws ParseError if a syntax error is detected.
|
||||
* @throws ParseException if a syntax error is detected.
|
||||
*/
|
||||
@NotNull
|
||||
static BracketPairs fromBracketPairList(@NotNull final String bracketPairs) throws ParseError {
|
||||
static BracketPairs fromBracketPairList(@NotNull final String bracketPairs) throws ParseException {
|
||||
StringBuilder openBrackets = new StringBuilder();
|
||||
StringBuilder closeBrackets = new StringBuilder();
|
||||
ParseState state = ParseState.OPEN;
|
||||
@@ -90,13 +89,13 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
if (ch == ':') {
|
||||
state = ParseState.CLOSE;
|
||||
} else {
|
||||
throw new ParseError("expecting ':', but got '" + ch + "' instead");
|
||||
throw new ParseException("expecting ':', but got '" + ch + "' instead");
|
||||
}
|
||||
break;
|
||||
case CLOSE:
|
||||
final char lastOpenBracket = openBrackets.charAt(openBrackets.length() - 1);
|
||||
if (lastOpenBracket == ch) {
|
||||
throw new ParseError("open and close brackets must be different");
|
||||
throw new ParseException("open and close brackets must be different");
|
||||
}
|
||||
closeBrackets.append(ch);
|
||||
state = ParseState.COMMA;
|
||||
@@ -105,13 +104,13 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
if (ch == ',') {
|
||||
state = ParseState.OPEN;
|
||||
} else {
|
||||
throw new ParseError("expecting ',', but got '" + ch + "' instead");
|
||||
throw new ParseException("expecting ',', but got '" + ch + "' instead");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (state != ParseState.COMMA) {
|
||||
throw new ParseError("list of pairs is incomplete");
|
||||
throw new ParseException("list of pairs is incomplete");
|
||||
}
|
||||
return new BracketPairs(openBrackets.toString(), closeBrackets.toString());
|
||||
}
|
||||
@@ -183,8 +182,8 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
if (bracketPairsVar != null) {
|
||||
try {
|
||||
bracketPairs = BracketPairs.fromBracketPairList(bracketPairsVar);
|
||||
} catch (BracketPairs.ParseError parseError) {
|
||||
VimPlugin.showMessage("argtextobj: Invalid value of g:argtextobj_pairs -- " + parseError.getMessage());
|
||||
} catch (BracketPairs.ParseException parseException) {
|
||||
VimPlugin.showMessage("argtextobj: Invalid value of g:argtextobj_pairs -- " + parseException.getMessage());
|
||||
VimPlugin.indicateError();
|
||||
return null;
|
||||
}
|
||||
@@ -590,20 +589,20 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
private int skipSexp(final int start, final int end, SexpDirection dir) {
|
||||
char lastChar = getCharAt(start);
|
||||
assert dir.isOpenBracket(lastChar);
|
||||
Stack<Character> bracketStack = new Stack<>();
|
||||
Deque<Character> bracketStack = new ArrayDeque<>();
|
||||
bracketStack.push(lastChar);
|
||||
int i = start + dir.delta();
|
||||
while (!bracketStack.empty() && i != end) {
|
||||
while (!bracketStack.isEmpty() && i != end) {
|
||||
final char ch = getCharAt(i);
|
||||
if (dir.isOpenBracket(ch)) {
|
||||
bracketStack.push(ch);
|
||||
} else {
|
||||
if (dir.isCloseBracket(ch)) {
|
||||
if (bracketStack.lastElement() == brackets.matchingBracket(ch)) {
|
||||
if (bracketStack.getLast() == brackets.matchingBracket(ch)) {
|
||||
bracketStack.pop();
|
||||
} else {
|
||||
//noinspection StatementWithEmptyBody
|
||||
if (brackets.getBracketPrio(ch) < brackets.getBracketPrio(bracketStack.lastElement())) {
|
||||
if (brackets.getBracketPrio(ch) < brackets.getBracketPrio(bracketStack.getLast())) {
|
||||
// (<...) -> (...)
|
||||
bracketStack.pop();
|
||||
// Retry the same character again for cases like (...<<...).
|
||||
@@ -621,7 +620,7 @@ public class VimArgTextObjExtension implements VimExtension {
|
||||
}
|
||||
i += dir.delta();
|
||||
}
|
||||
if (bracketStack.empty()) {
|
||||
if (bracketStack.isEmpty()) {
|
||||
return i;
|
||||
} else {
|
||||
return start + dir.delta();
|
||||
|
@@ -64,6 +64,7 @@ import com.maddyhome.idea.vim.key.OperatorFunction
|
||||
*/
|
||||
|
||||
class VimExchangeExtension : VimExtension {
|
||||
|
||||
override fun getName() = "exchange"
|
||||
|
||||
override fun init() {
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
package com.maddyhome.idea.vim.extension.highlightedyank
|
||||
|
||||
import com.intellij.ide.ui.LafManager
|
||||
import com.intellij.ide.ui.LafManagerListener
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.editor.Editor
|
||||
@@ -44,8 +46,19 @@ import java.util.concurrent.TimeUnit
|
||||
const val DEFAULT_HIGHLIGHT_DURATION: Long = 300
|
||||
private const val HIGHLIGHT_DURATION_VARIABLE_NAME = "g:highlightedyank_highlight_duration"
|
||||
private const val HIGHLIGHT_COLOR_VARIABLE_NAME = "g:highlightedyank_highlight_color"
|
||||
private val DEFAULT_HIGHLIGHT_TEXT_COLOR: Color = EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES.defaultAttributes.backgroundColor
|
||||
private var defaultHighlightTextColor: Color? = null
|
||||
|
||||
private fun getDefaultHighlightTextColor(): Color {
|
||||
return defaultHighlightTextColor
|
||||
?: return EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES.defaultAttributes.backgroundColor
|
||||
.also { defaultHighlightTextColor = it }
|
||||
}
|
||||
|
||||
class HighlightColorResetter : LafManagerListener {
|
||||
override fun lookAndFeelChanged(source: LafManager) {
|
||||
defaultHighlightTextColor = null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author KostkaBrukowa (@kostkabrukowa)
|
||||
@@ -164,7 +177,7 @@ class VimHighlightedYank: VimExtension, VimYankListener, VimInsertListener {
|
||||
}
|
||||
|
||||
private fun extractUsersHighlightColor(): Color {
|
||||
return extractVariable(HIGHLIGHT_COLOR_VARIABLE_NAME, DEFAULT_HIGHLIGHT_TEXT_COLOR) { value ->
|
||||
return extractVariable(HIGHLIGHT_COLOR_VARIABLE_NAME, getDefaultHighlightTextColor()) { value ->
|
||||
val rgba = value
|
||||
.substring(4)
|
||||
.filter { it != '(' && it != ')' && !it.isWhitespace() }
|
||||
|
@@ -57,6 +57,7 @@ private const val ALL_OCCURRENCES = "<Plug>AllOccurrences"
|
||||
* See https://github.com/terryma/vim-multiple-cursors
|
||||
* */
|
||||
class VimMultipleCursorsExtension : VimExtension {
|
||||
|
||||
override fun getName() = "multiple-cursors"
|
||||
|
||||
override fun init() {
|
||||
|
@@ -34,7 +34,6 @@ import com.maddyhome.idea.vim.extension.VimExtensionFacade.putKeyMapping
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionFacade.setOperatorFunction
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.group.RegisterGroup
|
||||
import com.maddyhome.idea.vim.group.copy.PutData
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||
@@ -46,6 +45,7 @@ import com.maddyhome.idea.vim.key.OperatorFunction
|
||||
|
||||
|
||||
class ReplaceWithRegister : VimExtension {
|
||||
|
||||
override fun getName(): String = "ReplaceWithRegister"
|
||||
|
||||
override fun init() {
|
||||
@@ -144,7 +144,7 @@ class ReplaceWithRegister : VimExtension {
|
||||
VimPlugin.getPut().putText(editor, EditorDataContext(editor), putData)
|
||||
|
||||
VimPlugin.getRegister().saveRegister(savedRegister.name, savedRegister)
|
||||
VimPlugin.getRegister().saveRegister(RegisterGroup.DEFAULT_REGISTER, savedRegister)
|
||||
VimPlugin.getRegister().saveRegister(VimPlugin.getRegister().defaultRegister, savedRegister)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ import javax.swing.KeyStroke
|
||||
* @author vlan
|
||||
*/
|
||||
class VimSurroundExtension : VimExtension {
|
||||
|
||||
override fun getName() = "surround"
|
||||
|
||||
override fun init() {
|
||||
|
@@ -61,12 +61,14 @@ import static com.maddyhome.idea.vim.helper.StringHelper.parseKeys;
|
||||
* @author Alexandre Grison (@agrison)
|
||||
*/
|
||||
public class VimTextObjEntireExtension implements VimExtension {
|
||||
|
||||
@Override
|
||||
public @NotNull
|
||||
String getName() {
|
||||
return "textobj-entire";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
putExtensionHandlerMapping(MappingMode.XO, parseKeys("<Plug>textobj-entire-a"), getOwner(),
|
||||
|
@@ -636,7 +636,9 @@ public class ChangeGroup {
|
||||
repeatInsertText(editor, context, started ? (i == 0 ? count : count + 1) : count);
|
||||
}
|
||||
else if (EditorHelper.getVisualLineLength(editor, visualLine + i) >= repeatColumn) {
|
||||
caret.moveToVisualPosition(new VisualPosition(visualLine + i, repeatColumn));
|
||||
VisualPosition visualPosition = new VisualPosition(visualLine + i, repeatColumn);
|
||||
int inlaysCount = InlayHelperKt.amountOfInlaysBeforeVisualPosition(editor, visualPosition);
|
||||
caret.moveToVisualPosition(new VisualPosition(visualLine + i, repeatColumn + inlaysCount));
|
||||
repeatInsertText(editor, context, started ? (i == 0 ? count : count + 1) : count);
|
||||
}
|
||||
}
|
||||
@@ -768,9 +770,10 @@ public class ChangeGroup {
|
||||
public boolean deleteEndOfLine(@NotNull Editor editor, @NotNull Caret caret, int count) {
|
||||
int initialOffset = caret.getOffset();
|
||||
int offset = VimPlugin.getMotion().moveCaretToLineEndOffset(editor, caret, count - 1, true);
|
||||
int lineStart = VimPlugin.getMotion().moveCaretToLineStart(editor, caret);
|
||||
|
||||
int startOffset = initialOffset;
|
||||
if (offset == initialOffset) startOffset--; // handle delete from virtual space
|
||||
if (offset == initialOffset && offset != lineStart) startOffset--; // handle delete from virtual space
|
||||
|
||||
if (offset != -1) {
|
||||
final TextRange rangeToDelete = new TextRange(startOffset, offset);
|
||||
@@ -1251,10 +1254,9 @@ public class ChangeGroup {
|
||||
}
|
||||
|
||||
if (kludge) {
|
||||
int size = fileSize;
|
||||
int cnt = count * motion.getCount();
|
||||
int pos1 = SearchHelper.findNextWordEnd(chars, offset, size, cnt, bigWord, false);
|
||||
int pos2 = SearchHelper.findNextWordEnd(chars, pos1, size, -cnt, bigWord, false);
|
||||
int pos1 = SearchHelper.findNextWordEnd(chars, offset, fileSize, cnt, bigWord, false);
|
||||
int pos2 = SearchHelper.findNextWordEnd(chars, pos1, fileSize, -cnt, bigWord, false);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("pos=" + offset);
|
||||
logger.debug("pos1=" + pos1);
|
||||
@@ -1770,7 +1772,7 @@ public class ChangeGroup {
|
||||
}
|
||||
|
||||
private static void resetCaret(@NotNull VirtualFile virtualFile, Project proj, boolean insert) {
|
||||
logger.info("Reset caret to a " + (insert ? "non-block" : "block") + " shape");
|
||||
logger.debug("Reset caret to a " + (insert ? "non-block" : "block") + " shape");
|
||||
Document doc = FileDocumentManager.getInstance().getDocument(virtualFile);
|
||||
if (doc == null) return; // Must be no text editor (such as image)
|
||||
Editor[] editors = EditorFactory.getInstance().getEditors(doc, proj);
|
||||
@@ -1975,7 +1977,7 @@ public class ChangeGroup {
|
||||
if (!Character.isLetter(ch)) throw new RuntimeException("Not alpha number : " + text);
|
||||
ch += count;
|
||||
if (Character.isLetter(ch)) {
|
||||
number = "" + ch;
|
||||
number = String.valueOf(ch);
|
||||
}
|
||||
}
|
||||
else if (SearchHelper.NumberType.DEC.equals(numberType)) {
|
||||
|
@@ -51,7 +51,7 @@ class CommandGroup {
|
||||
return name in this.aliases
|
||||
}
|
||||
|
||||
fun getAlias(name: String): Alias {
|
||||
private fun getAlias(name: String): Alias {
|
||||
return this.aliases[name]!!
|
||||
}
|
||||
|
||||
|
@@ -498,8 +498,8 @@ public class KeyGroup implements PersistentStateComponent<Element> {
|
||||
if (action instanceof VimShortcutKeyAction) {
|
||||
continue;
|
||||
}
|
||||
final com.intellij.openapi.actionSystem.Shortcut[] shortcuts = action.getShortcutSet().getShortcuts();
|
||||
for (com.intellij.openapi.actionSystem.Shortcut shortcut : shortcuts) {
|
||||
final Shortcut[] shortcuts = action.getShortcutSet().getShortcuts();
|
||||
for (Shortcut shortcut : shortcuts) {
|
||||
if (shortcut.isKeyboard() && shortcut.startsWith(keyStrokeShortcut) && !results.contains(action)) {
|
||||
results.add(action);
|
||||
}
|
||||
|
@@ -122,7 +122,7 @@ public class MarkGroup implements PersistentStateComponent<Element> {
|
||||
else if (FILE_MARKS.indexOf(ch) >= 0) {
|
||||
final HashMap<Character, Mark> fmarks = getFileMarks(editor.getDocument());
|
||||
if (fmarks != null) {
|
||||
mark = (Mark)fmarks.get(ch);
|
||||
mark = fmarks.get(ch);
|
||||
if (mark != null && mark.isClear()) {
|
||||
fmarks.remove(ch);
|
||||
mark = null;
|
||||
@@ -171,7 +171,7 @@ public class MarkGroup implements PersistentStateComponent<Element> {
|
||||
if (fmarks == null) {
|
||||
return null;
|
||||
}
|
||||
Mark mark = (Mark)fmarks.get(ch);
|
||||
Mark mark = fmarks.get(ch);
|
||||
if (mark != null && mark.isClear()) {
|
||||
fmarks.remove(ch);
|
||||
mark = null;
|
||||
@@ -752,7 +752,7 @@ public class MarkGroup implements PersistentStateComponent<Element> {
|
||||
|
||||
public static class MarkListener implements BookmarksListener {
|
||||
|
||||
private WeakReference<Project> project;
|
||||
private final WeakReference<Project> project;
|
||||
private Bookmark bookmarkTemplate = null;
|
||||
|
||||
@Contract(pure = true)
|
||||
|
@@ -304,7 +304,7 @@ public class MotionGroup {
|
||||
final int oldOffset = caret.getOffset();
|
||||
InlayHelperKt.moveToInlayAwareOffset(caret, offset);
|
||||
if (oldOffset != offset) {
|
||||
UserDataManager.setVimLastColumn(caret, caret.getVisualPosition().column);
|
||||
UserDataManager.setVimLastColumn(caret, InlayHelperKt.getInlayAwareVisualColumn(caret));
|
||||
if (caret == editor.getCaretModel().getPrimaryCaret()) {
|
||||
scrollCaretIntoView(editor);
|
||||
}
|
||||
@@ -1257,7 +1257,7 @@ public class MotionGroup {
|
||||
col = normalizeVisualColumn(editor, line, col, CommandStateHelper.isEndAllowedIgnoringOnemore(CommandStateHelper.getMode(editor)));
|
||||
}
|
||||
else {
|
||||
int newInlineElements = EditorHelperRt.amountOfInlaysBeforeVisualPosition(editor, new VisualPosition(line, col));
|
||||
int newInlineElements = InlayHelperKt.amountOfInlaysBeforeVisualPosition(editor, new VisualPosition(line, col));
|
||||
|
||||
col = normalizeVisualColumn(editor, line, col, CommandStateHelper.isEndAllowed(CommandStateHelper.getMode(editor)));
|
||||
col += newInlineElements;
|
||||
|
@@ -52,7 +52,7 @@ public class ProcessGroup {
|
||||
}
|
||||
|
||||
String initText = "";
|
||||
String label = "" + leader;
|
||||
String label = String.valueOf(leader);
|
||||
|
||||
ExEntryPanel panel = ExEntryPanel.getInstance();
|
||||
panel.activate(editor, context, label, initText, count);
|
||||
|
@@ -88,9 +88,9 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
private static final List<Character> CLIPBOARD_REGISTERS = ImmutableList.of('*', '+');
|
||||
private static final Logger logger = Logger.getInstance(RegisterGroup.class.getName());
|
||||
|
||||
public final static char UNNAMED_REGISTER = '"';
|
||||
public static char DEFAULT_REGISTER = UNNAMED_REGISTER;
|
||||
private char lastRegister = DEFAULT_REGISTER;
|
||||
public static final char UNNAMED_REGISTER = '"';
|
||||
private char defaultRegister = UNNAMED_REGISTER;
|
||||
private char lastRegister = defaultRegister;
|
||||
private final @NotNull HashMap<Character, Register> registers = new HashMap<>();
|
||||
private char recordRegister = 0;
|
||||
private @Nullable List<KeyStroke> recordList = null;
|
||||
@@ -99,15 +99,15 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
final ListOption clipboardOption = OptionsManager.INSTANCE.getClipboard();
|
||||
clipboardOption.addOptionChangeListenerAndExecute((oldValue, newValue) -> {
|
||||
if (clipboardOption.contains("unnamed")) {
|
||||
DEFAULT_REGISTER = '*';
|
||||
defaultRegister = '*';
|
||||
}
|
||||
else if (clipboardOption.contains("unnamedplus")) {
|
||||
DEFAULT_REGISTER = '+';
|
||||
defaultRegister = '+';
|
||||
}
|
||||
else {
|
||||
DEFAULT_REGISTER = UNNAMED_REGISTER;
|
||||
defaultRegister = UNNAMED_REGISTER;
|
||||
}
|
||||
lastRegister = DEFAULT_REGISTER;
|
||||
lastRegister = defaultRegister;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
* Reset the selected register back to the default register.
|
||||
*/
|
||||
public void resetRegister() {
|
||||
lastRegister = DEFAULT_REGISTER;
|
||||
lastRegister = defaultRegister;
|
||||
logger.debug("Last register reset to default register");
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
editor.offsetToLogicalPosition(start).line == editor.offsetToLogicalPosition(end).line;
|
||||
|
||||
// Deletes go into numbered registers only if text is smaller than a line, register is used or it's a special case
|
||||
if (!smallInlineDeletion || register != DEFAULT_REGISTER || isSmallDeletionSpecialCase(editor)) {
|
||||
if (!smallInlineDeletion || register != defaultRegister || isSmallDeletionSpecialCase(editor)) {
|
||||
// Old 1 goes to 2, etc. Old 8 to 9, old 9 is lost
|
||||
for (char d = '8'; d >= '1'; d--) {
|
||||
Register t = registers.get(d);
|
||||
@@ -241,12 +241,12 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
}
|
||||
|
||||
// Deletes smaller than one line and without specified register go the the "-" register
|
||||
if (smallInlineDeletion && register == DEFAULT_REGISTER) {
|
||||
if (smallInlineDeletion && register == defaultRegister) {
|
||||
registers.put('-', new Register('-', type, processedText, new ArrayList<>(transferableData)));
|
||||
}
|
||||
}
|
||||
// Yanks also go to register 0 if the default register was used
|
||||
else if (register == DEFAULT_REGISTER) {
|
||||
else if (register == defaultRegister) {
|
||||
registers.put('0', new Register('0', type, processedText, new ArrayList<>(transferableData)));
|
||||
if (logger.isDebugEnabled()) logger.debug("register '" + '0' + "' contains: \"" + processedText + "\"");
|
||||
}
|
||||
@@ -372,7 +372,7 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
* The register key for the default register.
|
||||
*/
|
||||
public char getDefaultRegister() {
|
||||
return DEFAULT_REGISTER;
|
||||
return defaultRegister;
|
||||
}
|
||||
|
||||
public @NotNull List<Register> getRegisters() {
|
||||
|
@@ -874,7 +874,7 @@ public class SearchGroup implements PersistentStateComponent<Element> {
|
||||
|
||||
private int findItOffset(@NotNull Editor editor, int startOffset, int count, int dir) {
|
||||
boolean wrap = OptionsManager.INSTANCE.getWrapscan().isSet();
|
||||
logger.info("Perform search. Direction: " + dir + " wrap: " + wrap);
|
||||
logger.debug("Perform search. Direction: " + dir + " wrap: " + wrap);
|
||||
|
||||
int offset = 0;
|
||||
boolean offsetIsLineOffset = false;
|
||||
@@ -977,11 +977,8 @@ public class SearchGroup implements PersistentStateComponent<Element> {
|
||||
|
||||
res = search(editor, lastOffset.substring(ppos + 1), res, 1, flags);
|
||||
|
||||
return res;
|
||||
}
|
||||
else {
|
||||
return res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@RWLockLabel.SelfSynchronized
|
||||
|
@@ -182,7 +182,7 @@ class YankGroup {
|
||||
|
||||
private fun yankRange(editor: Editor, range: TextRange, type: SelectionType,
|
||||
startOffsets: Map<Caret, Int>?): Boolean {
|
||||
startOffsets?.forEach { caret, offset -> MotionGroup.moveCaret(editor, caret, offset) }
|
||||
startOffsets?.forEach { (caret, offset) -> MotionGroup.moveCaret(editor, caret, offset) }
|
||||
|
||||
notifyListeners(editor, range)
|
||||
|
||||
|
@@ -55,7 +55,7 @@ object IdeaSelectionControl {
|
||||
|
||||
if (editor.isIdeaVimDisabledHere) return@singleTask
|
||||
|
||||
logger.info("Adjust non-vim selection. Source: $selectionSource")
|
||||
logger.debug("Adjust non-vim selection. Source: $selectionSource")
|
||||
|
||||
// Perform logic in one of the next cases:
|
||||
// - There was no selection and now it is
|
||||
@@ -69,13 +69,13 @@ object IdeaSelectionControl {
|
||||
return@singleTask
|
||||
}
|
||||
|
||||
logger.info("Some carets have selection. State before adjustment: ${editor.commandState.toSimpleString()}")
|
||||
logger.debug("Some carets have selection. State before adjustment: ${editor.commandState.toSimpleString()}")
|
||||
|
||||
editor.popAllModes()
|
||||
|
||||
activateMode(editor, chooseSelectionMode(editor, selectionSource, true))
|
||||
} else {
|
||||
logger.info("None of carets have selection. State before adjustment: ${editor.commandState.toSimpleString()}")
|
||||
logger.debug("None of carets have selection. State before adjustment: ${editor.commandState.toSimpleString()}")
|
||||
if (editor.inVisualMode) editor.exitVisualMode()
|
||||
if (editor.inSelectMode) editor.exitSelectMode(false)
|
||||
|
||||
@@ -86,7 +86,7 @@ object IdeaSelectionControl {
|
||||
|
||||
KeyHandler.getInstance().reset(editor)
|
||||
updateCaretState(editor)
|
||||
logger.info("${editor.mode} is enabled")
|
||||
logger.debug("${editor.mode} is enabled")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,23 +132,23 @@ object IdeaSelectionControl {
|
||||
private fun chooseSelectionMode(editor: Editor, selectionSource: VimListenerManager.SelectionSource, logReason: Boolean): CommandState.Mode {
|
||||
return when {
|
||||
editor.isOneLineMode -> {
|
||||
if (logReason) logger.info("Enter select mode. Reason: one line mode")
|
||||
if (logReason) logger.debug("Enter select mode. Reason: one line mode")
|
||||
CommandState.Mode.SELECT
|
||||
}
|
||||
selectionSource == VimListenerManager.SelectionSource.MOUSE && SelectModeOptionData.mouse in OptionsManager.selectmode -> {
|
||||
if (logReason) logger.info("Enter select mode. Selection source is mouse and selectMode option has mouse")
|
||||
if (logReason) logger.debug("Enter select mode. Selection source is mouse and selectMode option has mouse")
|
||||
CommandState.Mode.SELECT
|
||||
}
|
||||
editor.isTemplateActive() && IdeaRefactorMode.selectMode() -> {
|
||||
if (logReason) logger.info("Enter select mode. Template is active and selectMode has template")
|
||||
if (logReason) logger.debug("Enter select mode. Template is active and selectMode has template")
|
||||
CommandState.Mode.SELECT
|
||||
}
|
||||
selectionSource == VimListenerManager.SelectionSource.OTHER && SelectModeOptionData.ideaselectionEnabled() -> {
|
||||
if (logReason) logger.info("Enter select mode. Selection source is OTHER and selectMode has refactoring")
|
||||
if (logReason) logger.debug("Enter select mode. Selection source is OTHER and selectMode has refactoring")
|
||||
CommandState.Mode.SELECT
|
||||
}
|
||||
else -> {
|
||||
if (logReason) logger.info("Enter visual mode")
|
||||
if (logReason) logger.debug("Enter visual mode")
|
||||
CommandState.Mode.VISUAL
|
||||
}
|
||||
}
|
||||
|
@@ -152,7 +152,7 @@ class VimBlockSelection(
|
||||
override val vimStart: Int,
|
||||
override val vimEnd: Int,
|
||||
override val editor: Editor,
|
||||
val toLineEnd: Boolean
|
||||
private val toLineEnd: Boolean
|
||||
) : VimSelection() {
|
||||
override fun getNativeStartAndEnd() = blockToNativeSelection(editor, vimStart, vimEnd, CommandState.Mode.VISUAL).let {
|
||||
editor.logicalPositionToOffset(it.first) to editor.logicalPositionToOffset(it.second)
|
||||
|
@@ -784,7 +784,8 @@ public class EditorHelper {
|
||||
VisualPosition visualPosition = caret.getVisualPosition();
|
||||
|
||||
// Current column equals to vimLastColumn. It's great, everything is okay.
|
||||
if (visualPosition.column == vimLastColumn) return vimLastColumn;
|
||||
int inlayAwareOffset = InlayHelperKt.toInlayAwareOffset(visualPosition, caret);
|
||||
if (inlayAwareOffset == vimLastColumn) return vimLastColumn;
|
||||
|
||||
Editor editor = caret.getEditor();
|
||||
boolean isEndAllowed = CommandStateHelper.isEndAllowedIgnoringOnemore(CommandStateHelper.getMode(editor));
|
||||
@@ -802,8 +803,7 @@ public class EditorHelper {
|
||||
}
|
||||
|
||||
// Okay here we know that something is definitely wrong. We set vimLastColumn to the current column.
|
||||
int updatedCol = visualPosition.column;
|
||||
updatedCol -= EditorHelperRt.getAmountOfInlaysBeforeCaret(caret);
|
||||
int updatedCol = InlayHelperKt.getInlayAwareVisualColumn(caret);
|
||||
UserDataManager.setVimLastColumn(caret, updatedCol);
|
||||
return updatedCol;
|
||||
}
|
||||
|
@@ -20,14 +20,15 @@
|
||||
|
||||
package com.maddyhome.idea.vim.helper
|
||||
|
||||
import com.intellij.ide.ui.laf.darcula.DarculaUIUtil
|
||||
import com.intellij.openapi.diagnostic.logger
|
||||
import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.VisualPosition
|
||||
import com.intellij.openapi.editor.ex.util.EditorUtil
|
||||
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx
|
||||
import com.intellij.util.ui.table.JBTableRowEditor
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
import java.awt.Component
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.JTable
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
val Editor.fileSize: Int
|
||||
@@ -40,22 +41,35 @@ val Editor.fileSize: Int
|
||||
val Editor.isIdeaVimDisabledHere: Boolean
|
||||
get() {
|
||||
var res = true
|
||||
val start = System.currentTimeMillis()
|
||||
val times = mutableListOf<Pair<Long, String>>()
|
||||
val timeForCalculation = measureTimeMillis {
|
||||
res = (disabledInDialog
|
||||
|| isDatabaseCell && !OptionsManager.oneline.isSet
|
||||
|| isOneLineMode && !OptionsManager.oneline.isSet)
|
||||
res = (disabledInDialog.apply { times += System.currentTimeMillis() to "Disabled in dialog" }
|
||||
|
||||
|| (!OptionsManager.ideaenabledbufs.contains("singleline")
|
||||
.apply { times += System.currentTimeMillis() to "first single line check" }
|
||||
&& isDatabaseCell(times).apply { times += System.currentTimeMillis() to "is db cell" })
|
||||
|
||||
|| (!OptionsManager.ideaenabledbufs.contains("singleline")
|
||||
.apply { times += System.currentTimeMillis() to "second single line check" }
|
||||
&& isOneLineMode.apply { times += System.currentTimeMillis() to "is one line" })
|
||||
)
|
||||
}
|
||||
if (timeForCalculation > 10) {
|
||||
logger<Editor>().error("Time for calculation of 'isIdeaVimDisabledHere' took $timeForCalculation ms.")
|
||||
val timeDiffs = times.map { it.second + ": " + (it.first - start) }
|
||||
val message = "Time for calculation of 'isIdeaVimDisabledHere' took $timeForCalculation ms. Time diff: $timeDiffs"
|
||||
logger<Editor>().error(message)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
private val Editor.isDatabaseCell: Boolean
|
||||
get() = DarculaUIUtil.isTableCellEditor(this.component)
|
||||
private fun Editor.isDatabaseCell(times: MutableList<Pair<Long, String>>): Boolean {
|
||||
return isTableCellEditor(this.component, times)
|
||||
}
|
||||
|
||||
private val Editor.disabledInDialog: Boolean
|
||||
get() = OptionsManager.dialogescape.value == "off" && (!this.isPrimaryEditor() && !EditorHelper.isFileEditor(this))
|
||||
get() = (!OptionsManager.ideaenabledbufs.contains("dialog") && !OptionsManager.ideaenabledbufs.contains("dialoglegacy"))
|
||||
&& (!this.isPrimaryEditor() && !EditorHelper.isFileEditor(this))
|
||||
|
||||
/**
|
||||
* Checks if the editor is a primary editor in the main editing area.
|
||||
@@ -66,14 +80,26 @@ fun Editor.isPrimaryEditor(): Boolean {
|
||||
return fileEditorManager.allEditors.any { fileEditor -> this == EditorUtil.getEditorEx(fileEditor) }
|
||||
}
|
||||
|
||||
val Caret.amountOfInlaysBeforeCaret: Int
|
||||
get() {
|
||||
val curLineStartOffset: Int = this.editor.document.getLineStartOffset(logicalPosition.line)
|
||||
return this.editor.inlayModel.getInlineElementsInRange(curLineStartOffset, this.offset).size
|
||||
}
|
||||
// Optimized clone of com.intellij.ide.ui.laf.darcula.DarculaUIUtil.isTableCellEditor
|
||||
private fun isTableCellEditor(c: Component, times: MutableList<Pair<Long, String>>): Boolean {
|
||||
return (java.lang.Boolean.TRUE == (c as JComponent).getClientProperty("JComboBox.isTableCellEditor"))
|
||||
.apply { times += System.currentTimeMillis() to "is property tru" } ||
|
||||
|
||||
fun Editor.amountOfInlaysBeforeVisualPosition(pos: VisualPosition): Int {
|
||||
val newOffset = EditorHelper.visualPositionToOffset(this, pos)
|
||||
val lineStartNewOffset: Int = this.document.getLineStartOffset(this.visualToLogicalPosition(pos).line)
|
||||
return this.inlayModel.getInlineElementsInRange(lineStartNewOffset, newOffset).size
|
||||
(findParentByCondition(c) { it is JTable } != null)
|
||||
.apply { times += System.currentTimeMillis() to "is not null" } &&
|
||||
|
||||
(findParentByCondition(c) { it is JBTableRowEditor } == null)
|
||||
.apply { times += System.currentTimeMillis() to "is null" }
|
||||
}
|
||||
|
||||
private const val PARENT_BY_CONDITION_DEPTH = 10
|
||||
|
||||
private inline fun findParentByCondition(c: Component?, condition: (Component?) -> Boolean): Component? {
|
||||
var eachParent = c
|
||||
var goDeep = PARENT_BY_CONDITION_DEPTH
|
||||
while (eachParent != null && --goDeep > 0) {
|
||||
if (condition(eachParent)) return eachParent
|
||||
eachParent = eachParent.parent
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
@@ -73,3 +73,20 @@ private fun inlayAwareOffsetToVisualPosition(editor: Editor, offset: Int): Visua
|
||||
}
|
||||
return pos
|
||||
}
|
||||
|
||||
val Caret.inlayAwareVisualColumn: Int
|
||||
get() = this.visualPosition.column - this.amountOfInlaysBeforeCaret
|
||||
|
||||
val Caret.amountOfInlaysBeforeCaret: Int
|
||||
get() {
|
||||
val curLineStartOffset: Int = this.editor.document.getLineStartOffset(logicalPosition.line)
|
||||
return this.editor.inlayModel.getInlineElementsInRange(curLineStartOffset, this.offset).size
|
||||
}
|
||||
|
||||
fun Editor.amountOfInlaysBeforeVisualPosition(pos: VisualPosition): Int {
|
||||
val newOffset = EditorHelper.visualPositionToOffset(this, pos)
|
||||
val lineStartNewOffset: Int = this.document.getLineStartOffset(this.visualToLogicalPosition(pos).line)
|
||||
return this.inlayModel.getInlineElementsInRange(lineStartNewOffset, newOffset).size
|
||||
}
|
||||
|
||||
fun VisualPosition.toInlayAwareOffset(caret: Caret): Int =this.column - caret.amountOfInlaysBeforeCaret
|
||||
|
@@ -138,7 +138,7 @@ public class SearchHelper {
|
||||
type == chars.charAt(start - 1) &&
|
||||
end < chars.length() &&
|
||||
close == chars.charAt(end)) {
|
||||
start = start - 1;
|
||||
start -= 1;
|
||||
pos = start;
|
||||
rangeSelection = true;
|
||||
}
|
||||
@@ -608,7 +608,7 @@ public class SearchHelper {
|
||||
final Pattern tagPattern = Pattern.compile(String.format("(?:%s)|(?:%s)", openingTagPattern, closingTagPattern));
|
||||
final Matcher matcher = tagPattern.matcher(sequence.subSequence(position, sequence.length()));
|
||||
|
||||
final Stack<String> openTags = new Stack<>();
|
||||
final Deque<String> openTags = new ArrayDeque<>();
|
||||
|
||||
while (matcher.find()) {
|
||||
boolean isClosingTag = matcher.group(1) == null;
|
||||
@@ -655,7 +655,7 @@ public class SearchHelper {
|
||||
final Pattern tagPattern =
|
||||
Pattern.compile(String.format(patternString, quotedTagName, quotedTagName), Pattern.CASE_INSENSITIVE);
|
||||
final Matcher matcher = tagPattern.matcher(sequence.subSequence(0, position + 1));
|
||||
final Stack<TextRange> openTags = new Stack<>();
|
||||
final Deque<TextRange> openTags = new ArrayDeque<>();
|
||||
|
||||
while (matcher.find()) {
|
||||
final TextRange match = new TextRange(matcher.start(), matcher.end());
|
||||
|
@@ -115,13 +115,10 @@ public class StringHelper {
|
||||
break;
|
||||
case ESCAPE:
|
||||
state = KeyParserState.INIT;
|
||||
if (c == '\\' || c == '<') {
|
||||
result.add(getKeyStroke(c));
|
||||
}
|
||||
else {
|
||||
if (c != '\\' && c != '<') {
|
||||
result.add(getKeyStroke('\\'));
|
||||
result.add(getKeyStroke(c));
|
||||
}
|
||||
result.add(getKeyStroke(c));
|
||||
break;
|
||||
case SPECIAL:
|
||||
if (c == '>' || c == '»') {
|
||||
@@ -168,7 +165,7 @@ public class StringHelper {
|
||||
}
|
||||
|
||||
private static @Nullable List<KeyStroke> parseMapLeader(@NotNull String s) {
|
||||
if ("leader".equals(s.toLowerCase())) {
|
||||
if ("leader".equalsIgnoreCase(s)) {
|
||||
final Object mapLeader = VimScriptGlobalEnvironment.getInstance().getVariables().get("mapleader");
|
||||
if (mapLeader instanceof String) {
|
||||
return stringToKeys((String)mapLeader);
|
||||
@@ -292,7 +289,7 @@ public class StringHelper {
|
||||
} else if (CharacterHelper.isInvisibleControlCharacter(c) || CharacterHelper.isZeroWidthCharacter(c)) {
|
||||
return String.format("<%04x>", (int) c);
|
||||
}
|
||||
return "" + c;
|
||||
return String.valueOf(c);
|
||||
}
|
||||
|
||||
public static boolean containsUpperCase(@NotNull String text) {
|
||||
@@ -430,7 +427,6 @@ public class StringHelper {
|
||||
case "esc":
|
||||
return VK_ESCAPE;
|
||||
case "bs":
|
||||
return VK_BACK_SPACE;
|
||||
case "backspace":
|
||||
return VK_BACK_SPACE;
|
||||
case "tab":
|
||||
|
@@ -64,7 +64,8 @@ fun Caret.vimSelectionStartClear() {
|
||||
private var Caret._vimSelectionStart: Int? by userDataCaretToEditor()
|
||||
//endregion ----------------------------------------------------
|
||||
|
||||
var Caret.vimLastColumn: Int by userDataCaretToEditorOr { (this as Caret).visualPosition.column - this.amountOfInlaysBeforeCaret }
|
||||
// Last column excluding inlays before the caret
|
||||
var Caret.vimLastColumn: Int by userDataCaretToEditorOr { (this as Caret).inlayAwareVisualColumn }
|
||||
var Caret.vimLastVisualOperatorRange: VisualChange? by userDataCaretToEditor()
|
||||
var Caret.vimInsertStart: RangeMarker by userDataOr { (this as Caret).editor.document.createRangeMarker(this.offset, this.offset) }
|
||||
|
||||
|
@@ -101,7 +101,7 @@ class ToKeysMappingInfo(
|
||||
}
|
||||
|
||||
class ToHandlerMappingInfo(
|
||||
val extensionHandler: VimExtensionHandler,
|
||||
private val extensionHandler: VimExtensionHandler,
|
||||
fromKeys: List<KeyStroke>,
|
||||
isRecursive: Boolean,
|
||||
owner: MappingOwner
|
||||
|
@@ -212,7 +212,7 @@ object VimListenerManager {
|
||||
val document = editor.document
|
||||
|
||||
if (SelectionVimListenerSuppressor.isNotLocked) {
|
||||
logger.info("Adjust non vim selection change")
|
||||
logger.debug("Adjust non vim selection change")
|
||||
IdeaSelectionControl.controlNonVimSelectionChange(editor)
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user