mirror of
https://github.com/chylex/IntelliJ-AceJump.git
synced 2025-09-16 16:24:48 +02:00
Compare commits
5 Commits
1f76a8bd25
...
broken-ide
Author | SHA1 | Date | |
---|---|---|---|
20ab421389
|
|||
59fbd4e19c
|
|||
6e08d56cdf
|
|||
9a14fb87e3
|
|||
d22bcc220e
|
@@ -4,23 +4,26 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.10"
|
kotlin("jvm") version "1.9.10"
|
||||||
id("org.jetbrains.intellij") version "1.16.1"
|
id("org.jetbrains.intellij") version "1.17.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "org.acejump"
|
group = "org.acejump"
|
||||||
version = "chylex-19"
|
version = "chylex-21"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
intellij {
|
intellij {
|
||||||
version.set("2023.3")
|
version.set("2024.2")
|
||||||
updateSinceUntilBuild.set(false)
|
updateSinceUntilBuild.set(false)
|
||||||
plugins.add("IdeaVIM:chylex-22")
|
|
||||||
|
// plugins.add("IdeaVIM:chylex-40")
|
||||||
|
// plugins.add("com.intellij.classic.ui:242.20224.159")
|
||||||
|
|
||||||
pluginsRepositories {
|
pluginsRepositories {
|
||||||
custom("https://intellij.chylex.com")
|
// custom("https://intellij.chylex.com")
|
||||||
|
// marketplace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +36,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.patchPluginXml {
|
tasks.patchPluginXml {
|
||||||
sinceBuild.set("233")
|
sinceBuild.set("242")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.buildSearchableOptions {
|
tasks.buildSearchableOptions {
|
||||||
|
@@ -10,13 +10,12 @@ import com.maddyhome.idea.vim.action.change.change.ChangeVisualAction
|
|||||||
import com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction
|
import com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction
|
||||||
import com.maddyhome.idea.vim.action.copy.YankVisualAction
|
import com.maddyhome.idea.vim.action.copy.YankVisualAction
|
||||||
import com.maddyhome.idea.vim.api.injector
|
import com.maddyhome.idea.vim.api.injector
|
||||||
import com.maddyhome.idea.vim.command.MappingMode.OP_PENDING
|
|
||||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||||
import com.maddyhome.idea.vim.group.visual.vimSetSelection
|
import com.maddyhome.idea.vim.group.visual.vimSetSelection
|
||||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||||
import com.maddyhome.idea.vim.helper.vimStateMachine
|
|
||||||
import com.maddyhome.idea.vim.newapi.vim
|
import com.maddyhome.idea.vim.newapi.vim
|
||||||
|
import com.maddyhome.idea.vim.state.mode.Mode
|
||||||
import com.maddyhome.idea.vim.state.mode.SelectionType
|
import com.maddyhome.idea.vim.state.mode.SelectionType
|
||||||
import org.acejump.boundaries.StandardBoundaries.AFTER_CARET
|
import org.acejump.boundaries.StandardBoundaries.AFTER_CARET
|
||||||
import org.acejump.boundaries.StandardBoundaries.BEFORE_CARET
|
import org.acejump.boundaries.StandardBoundaries.BEFORE_CARET
|
||||||
@@ -52,12 +51,11 @@ sealed class AceVimAction : DumbAwareAction() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val vim = editor.vim
|
val vim = editor.vim
|
||||||
val commandState = vim.vimStateMachine
|
val keyHandler = KeyHandler.getInstance()
|
||||||
if (commandState.isOperatorPending) {
|
if (keyHandler.isOperatorPending(vim.mode, keyHandler.keyHandlerState)) {
|
||||||
val key = commandState.commandBuilder.keys.singleOrNull()?.keyChar
|
val key = keyHandler.keyHandlerState.commandBuilder.keys.singleOrNull()?.keyChar
|
||||||
|
|
||||||
commandState.reset()
|
keyHandler.fullReset(vim)
|
||||||
KeyHandler.getInstance().fullReset(vim)
|
|
||||||
|
|
||||||
AceVimUtil.enterVisualMode(vim, SelectionType.CHARACTER_WISE)
|
AceVimUtil.enterVisualMode(vim, SelectionType.CHARACTER_WISE)
|
||||||
caret.vim.vimSetSelection(caret.offset, initialOffset, moveCaretToSelectionEnd = true)
|
caret.vim.vimSetSelection(caret.offset, initialOffset, moveCaretToSelectionEnd = true)
|
||||||
@@ -72,15 +70,16 @@ sealed class AceVimAction : DumbAwareAction() {
|
|||||||
if (action != null) {
|
if (action != null) {
|
||||||
ApplicationManager.getApplication().invokeLater {
|
ApplicationManager.getApplication().invokeLater {
|
||||||
WriteAction.run<Nothing> {
|
WriteAction.run<Nothing> {
|
||||||
commandState.commandBuilder.pushCommandPart(action)
|
keyHandler.keyHandlerState.commandBuilder.pushCommandPart(action)
|
||||||
|
|
||||||
val cmd = commandState.commandBuilder.buildCommand()
|
val cmd = keyHandler.keyHandlerState.commandBuilder.buildCommand()
|
||||||
val operatorArguments = OperatorArguments(commandState.mappingState.mappingMode == OP_PENDING, cmd.rawCount, commandState.mode)
|
val operatorArguments = OperatorArguments(vim.mode is Mode.OP_PENDING, cmd.rawCount, injector.vimState.mode)
|
||||||
|
|
||||||
commandState.executingCommand = cmd
|
injector.vimState.executingCommand = cmd
|
||||||
injector.actionExecutor.executeVimAction(vim, action, context, operatorArguments)
|
injector.actionExecutor.executeVimAction(vim, action, context, operatorArguments)
|
||||||
// TODO does not update status
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyHandler.reset(vim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user