mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
37 Commits
0.59.1-EAP
...
EAP-0.60.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a90ffb7a48 | ||
![]() |
d1e39903dd | ||
![]() |
f23793f3f3 | ||
![]() |
800390921c | ||
![]() |
9650450426 | ||
![]() |
7225ab1f1b | ||
![]() |
72dbc45457 | ||
![]() |
3d14f916ef | ||
![]() |
5598de70f1 | ||
![]() |
bfccdd6b35 | ||
![]() |
35f36070a4 | ||
![]() |
8f0c50a010 | ||
![]() |
25d6d3694b | ||
![]() |
6c784ec01e | ||
![]() |
ebc81c55c2 | ||
![]() |
d08d9fce99 | ||
![]() |
d1bfce1974 | ||
![]() |
0d0f326c26 | ||
![]() |
2072fa1e13 | ||
![]() |
fd98274e78 | ||
![]() |
e72c7d6cb7 | ||
![]() |
5860c0031b | ||
![]() |
a43232ba6c | ||
![]() |
b20bec610a | ||
![]() |
3a9f5ea33a | ||
![]() |
5d1caa21d8 | ||
![]() |
70b3156375 | ||
![]() |
d388a75f98 | ||
![]() |
b2a6d0e687 | ||
![]() |
462f5bab54 | ||
![]() |
e89e0466eb | ||
![]() |
c9d0d7aef6 | ||
![]() |
90c7d5a74a | ||
![]() |
b19e11b5b6 | ||
![]() |
2d002c044d | ||
![]() |
9a7b2bd158 | ||
![]() |
461c874de6 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -11,3 +11,7 @@
|
||||
/tmp/
|
||||
|
||||
*.DS_Store
|
||||
|
||||
.teamcity/.idea
|
||||
.teamcity/target
|
||||
.teamcity/*.iml
|
||||
|
70
.teamcity/_Self/Project.kt
vendored
Normal file
70
.teamcity/_Self/Project.kt
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
package _Self
|
||||
|
||||
import _Self.buildTypes.*
|
||||
import _Self.vcsRoots.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Project
|
||||
|
||||
object Project : Project({
|
||||
description = "Vim emulation plugin for the IntelliJ platform products"
|
||||
|
||||
vcsRoot(Branch_183)
|
||||
vcsRoot(Branch_181)
|
||||
vcsRoot(GitHubPullRequest)
|
||||
vcsRoot(Branch_191_193)
|
||||
vcsRoot(Branch_Nvim)
|
||||
|
||||
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)
|
||||
|
||||
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", "")
|
||||
}
|
||||
}
|
||||
})
|
45
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
Normal file
45
.teamcity/_Self/buildTypes/ActiveTests.kt
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
sealed class ActiveTests(buildName: String, ijVersion: String) : BuildType({
|
||||
name = buildName
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", ijVersion)
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean check"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
||||
|
||||
object TestsForIntelliJEAP : ActiveTests("Tests for IntelliJ Latest EAP", "LATEST-EAP-SNAPSHOT")
|
||||
object TestsForIntelliJ20202 : ActiveTests("Tests for IntelliJ 2020.2", "2020.2")
|
||||
object TestsForIntelliJ20201 : ActiveTests("Tests for IntelliJ 2020.1", "2020.1")
|
73
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
Normal file
73
.teamcity/_Self/buildTypes/GitHubPullRequests.kt
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import _Self.vcsRoots.GitHubPullRequest
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object GitHubPullRequests : BuildType({
|
||||
name = "GitHub Pull Requests"
|
||||
description = "Test GitHub pull requests"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.GitHubPullRequest)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
branchFilter = """
|
||||
+:*
|
||||
-:<default>
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
features {
|
||||
pullRequests {
|
||||
provider = github {
|
||||
authType = token {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
filterTargetBranch = "refs/heads/master"
|
||||
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
|
||||
}
|
||||
}
|
||||
commitStatusPublisher {
|
||||
vcsRootExtId = "${GitHubPullRequest.id}"
|
||||
publisher = github {
|
||||
githubUrl = "https://api.github.com"
|
||||
authType = personalToken {
|
||||
token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
|
||||
}
|
||||
}
|
||||
param("github_oauth_user", "AlexPl292")
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
50
.teamcity/_Self/buildTypes/Nvim.kt
vendored
Normal file
50
.teamcity/_Self/buildTypes/Nvim.kt
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
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.buildSteps.script
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||
|
||||
object Nvim : BuildType({
|
||||
name = "NVIM"
|
||||
description = "branch EAP"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_Nvim)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
})
|
36
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
36
.teamcity/_Self/buildTypes/Release.kt
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
package _Self.buildTypes
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
|
||||
object Release : BuildType({
|
||||
name = "Publish Release"
|
||||
description = "Build and publish IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "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")
|
||||
}
|
||||
}
|
||||
})
|
76
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
76
.teamcity/_Self/buildTypes/ReleaseEap.kt
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
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.buildFeatures.vcsLabeling
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.ScheduleTrigger
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
|
||||
|
||||
object ReleaseEap : BuildType({
|
||||
name = "Publish EAP Build"
|
||||
description = "Build and publish EAP of IdeaVim plugin"
|
||||
|
||||
artifactRules = "build/distributions/*"
|
||||
buildNumberPattern = "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")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(DslContext.settingsRoot)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
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) {
|
||||
}
|
||||
}
|
||||
})
|
42
.teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt
vendored
Normal file
42
.teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
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")
|
||||
}
|
||||
})
|
42
.teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt
vendored
Normal file
42
.teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
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")
|
||||
}
|
||||
})
|
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
vendored
Normal file
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
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 TestsForIntelliJ20183 : BuildType({
|
||||
name = "Tests for IntelliJ 2018.3"
|
||||
description = "branch 183"
|
||||
|
||||
params {
|
||||
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
|
||||
param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.3")
|
||||
param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
|
||||
param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
|
||||
}
|
||||
|
||||
vcs {
|
||||
root(_Self.vcsRoots.Branch_183)
|
||||
|
||||
checkoutMode = CheckoutMode.ON_SERVER
|
||||
}
|
||||
|
||||
steps {
|
||||
gradle {
|
||||
tasks = "clean test"
|
||||
buildFile = ""
|
||||
enableStacktrace = true
|
||||
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
vcs {
|
||||
branchFilter = ""
|
||||
}
|
||||
}
|
||||
|
||||
requirements {
|
||||
noLessThanVer("teamcity.agent.jvm.version", "1.8")
|
||||
}
|
||||
})
|
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt
vendored
Normal file
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
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")
|
||||
}
|
||||
})
|
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt
vendored
Normal file
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
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")
|
||||
}
|
||||
})
|
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt
vendored
Normal file
43
.teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
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")
|
||||
}
|
||||
})
|
12
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_181.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_181 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 181)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "181"
|
||||
useMirrors = false
|
||||
})
|
12
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_183.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_183 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 183)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "183"
|
||||
useMirrors = false
|
||||
})
|
12
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
Normal file
12
.teamcity/_Self/vcsRoots/Branch_191_193.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@file:Suppress("ClassName")
|
||||
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object Branch_191_193 : GitVcsRoot({
|
||||
name = "https://github.com/JetBrains/ideavim (branch 191-193)"
|
||||
url = "https://github.com/JetBrains/ideavim.git"
|
||||
branch = "191-193"
|
||||
useMirrors = false
|
||||
})
|
11
.teamcity/_Self/vcsRoots/Branch_Nvim.kt
vendored
Normal file
11
.teamcity/_Self/vcsRoots/Branch_Nvim.kt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
@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
Normal file
12
.teamcity/_Self/vcsRoots/GitHubPullRequest.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package _Self.vcsRoots
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||
|
||||
object GitHubPullRequest : GitVcsRoot({
|
||||
name = "IdeaVim Pull Requests"
|
||||
url = "git@github.com:JetBrains/ideavim.git"
|
||||
branchSpec = "+:refs/(pull/*)/head"
|
||||
authMethod = uploadedKey {
|
||||
uploadedKey = "Alex Plate TeamCity key"
|
||||
}
|
||||
})
|
104
.teamcity/pom.xml
vendored
Normal file
104
.teamcity/pom.xml
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>IdeaVim Config DSL Script</name>
|
||||
<groupId>IdeaVim</groupId>
|
||||
<artifactId>IdeaVim_dsl</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jetbrains-all</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>teamcity-server</id>
|
||||
<url>https://teamcity.jetbrains.com/app/dsl-plugins-repository</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>JetBrains</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${basedir}</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
|
||||
<configuration/>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>process-test-sources</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>teamcity-configs-maven-plugin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<configuration>
|
||||
<format>kotlin</format>
|
||||
<dstDir>target/generated-configs</dstDir>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin</artifactId>
|
||||
<version>${teamcity.dsl.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.teamcity</groupId>
|
||||
<artifactId>configs-dsl-kotlin-plugins</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
33
.teamcity/settings.kts
vendored
Normal file
33
.teamcity/settings.kts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
|
||||
/*
|
||||
The settings script is an entry point for defining a single
|
||||
TeamCity project. TeamCity looks for the 'settings.kts' file in a
|
||||
project directory and runs it if it's found, so the script name
|
||||
shouldn't be changed and its package should be the same as the
|
||||
project's id.
|
||||
|
||||
The script should contain a single call to the project() function
|
||||
with a Project instance or an init function as an argument.
|
||||
|
||||
VcsRoots, BuildTypes, and Templates of this project must be
|
||||
registered inside project using the vcsRoot(), buildType(), and
|
||||
template() methods respectively.
|
||||
|
||||
Subprojects can be defined either in their own settings.kts or by
|
||||
calling the subProjects() method in this project.
|
||||
|
||||
To debug settings scripts in command-line, run the
|
||||
|
||||
mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
|
||||
|
||||
command and attach your debugger to the port 8000.
|
||||
|
||||
To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View ->
|
||||
Tool Windows -> Maven Projects), find the generate task
|
||||
node (Plugins -> teamcity-configs -> teamcity-configs:generate),
|
||||
the 'Debug' option is available in the context menu for the task.
|
||||
*/
|
||||
|
||||
version = "2020.1"
|
||||
project(_Self.Project)
|
169
CHANGES.md
169
CHANGES.md
@@ -22,13 +22,20 @@ It is important to distinguish EAP from traditional pre-release software.
|
||||
Please note that the quality of EAP versions may at times be way below even
|
||||
usual beta standards.
|
||||
|
||||
To Be Released
|
||||
-----------
|
||||
## To Be Released
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* Ability to map IDE actions via the `<Action>` keyword. E.g. `map <C-K> <Action>(CommentByLineComment)`.
|
||||
Check out `README.md` for the details.
|
||||
* `IdeaVim: track action Ids` command to find action ids for the `:action` command.
|
||||
Enable this option in "Search everywhere" (double shift).
|
||||
|
||||
## 0.60, 2020-10-09
|
||||
|
||||
### Features:
|
||||
* Support of `virtualedit=onemore` ([VIM-844](https://youtrack.jetbrains.com/issue/VIM-844))
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-2097](https://youtrack.jetbrains.com/issue/VIM-2097) Do not apply mappings for register selecting
|
||||
* [VIM-2080](https://youtrack.jetbrains.com/issue/VIM-2080) Fix S command with count
|
||||
* [VIM-2099](https://youtrack.jetbrains.com/issue/VIM-2099) Fix operations with backward inclusive motions
|
||||
@@ -38,22 +45,21 @@ To Be Released
|
||||
* [VIM-1770](https://youtrack.jetbrains.com/issue/VIM-1770) Fix goto end with large inline hints
|
||||
* [VIM-2110](https://youtrack.jetbrains.com/issue/VIM-2110) Fix scrolling for non-monospaced fonts
|
||||
|
||||
**Changes:**
|
||||
### Changes:
|
||||
* `:w` works as `:wa` by default. This can be disabled with `ideawrite` option.
|
||||
|
||||
Now features like `Prettier on save` or `Run on save for files` would work with `:w` command as well.
|
||||
|
||||
See [VIM-1968](https://youtrack.jetbrains.com/issue/VIM-1968).
|
||||
|
||||
**Merged PRs:**
|
||||
### Merged PRs:
|
||||
* [248](https://github.com/JetBrains/ideavim/pull/248) by [Yaohui Wang](https://github.com/yaohui-wyh): Check if project is disposed when editorDeinit
|
||||
* [242](https://github.com/JetBrains/ideavim/pull/242) by [Iain Ballard](https://github.com/i-e-b): Partial implementation of virtualedit config
|
||||
* [252](https://github.com/JetBrains/ideavim/pull/252) by [Matt Ellis](https://github.com/citizenmatt): Fixes for scrolling
|
||||
|
||||
0.59, 2020-08-25
|
||||
------------
|
||||
## 0.59, 2020-08-25
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* `vim-highlightedyank` plugin emulation ([VIM-1970](https://youtrack.jetbrains.com/issue/VIM-1970) | [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank)).
|
||||
|
||||
* <details>
|
||||
@@ -63,22 +69,21 @@ To Be Released
|
||||
|
||||
* [VIM-2068](https://youtrack.jetbrains.com/issue/VIM-2068) `:tabclose` command
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1421](https://youtrack.jetbrains.com/issue/VIM-1421) Escape key finishes `t` and `f` motions
|
||||
* [VIM-2075](https://youtrack.jetbrains.com/issue/VIM-2075) Fix zR command
|
||||
* [VIM-2059](https://youtrack.jetbrains.com/issue/VIM-2059) Fixed macro editing
|
||||
|
||||
**Merged PRs:**
|
||||
### Merged PRs:
|
||||
* [237](https://github.com/JetBrains/ideavim/pull/237) by [Adrià Farrés](https://github.com/adriafarres): Reset operator-pending commands on escape
|
||||
* [241](https://github.com/JetBrains/ideavim/pull/241) by [Patrick Elmquist](https://github.com/patrick-elmquist): Properly reset when pressing Esc in the middle of command
|
||||
* [244](https://github.com/JetBrains/ideavim/pull/244) by [Rieon Ke](https://github.com/rieonke): Implement tabc[lose] ex command
|
||||
* [240](https://github.com/JetBrains/ideavim/pull/240) by [Rieon Ke](https://github.com/rieonke): add support for putting & editing macros
|
||||
* [245](https://github.com/JetBrains/ideavim/pull/245) by [KostkaBrukowa](https://github.com/KostkaBrukowa): VIM-1970 | Working solution of plugin vim-highlightedyank
|
||||
|
||||
0.58, 2020-07-07
|
||||
-------------
|
||||
## 0.58, 2020-07-07
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* `exchange` plugin emulation ([VIM-921](https://youtrack.jetbrains.com/issue/VIM-921) | [vim-exchange](https://github.com/tommcdo/vim-exchange)).
|
||||
* `~/.ideavimrc` file can be reloaded using the new floating action.
|
||||
|
||||
@@ -89,10 +94,10 @@ To Be Released
|
||||
|
||||
* Add `:buffer` command.
|
||||
|
||||
**Changes:**
|
||||
### Changes:
|
||||
* Support IntelliJ's smooth scrolling. Use "Enable smooth scrolling" checkbox in _Preferences | Editor | General_ to disable.
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1994](https://youtrack.jetbrains.com/issue/VIM-1994) Correct paste after `y}P` command.
|
||||
* [VIM-1924](https://youtrack.jetbrains.com/issue/VIM-1924) Select next occurrence doesn't become block selection.
|
||||
* [VIM-2038](https://youtrack.jetbrains.com/issue/VIM-2038) Last line is now accessible in normal mode
|
||||
@@ -102,7 +107,7 @@ To Be Released
|
||||
* Fix mappings to `"\<SPACE>"` including `let mapleader="\<SPACE>"`
|
||||
|
||||
|
||||
**Merged PRs:**
|
||||
### Merged PRs:
|
||||
* [233](https://github.com/JetBrains/ideavim/pull/233) by [valis](https://github.com/valis): [VIM-1994] Correct paste after `y}P` command.
|
||||
* [224](https://github.com/JetBrains/ideavim/pull/224) by [pmnoxx](https://github.com/pmnoxx): Populate intelij navigation history together with ideavim jumplist.
|
||||
* [227](https://github.com/JetBrains/ideavim/pull/227) by [angelbot](https://github.com/angelbot): Add support for buffer command.
|
||||
@@ -110,33 +115,31 @@ To Be Released
|
||||
* [231](https://github.com/JetBrains/ideavim/pull/231) by [citizenmatt](https://github.com/citizenmatt): Support smooth scrolling.
|
||||
* [239](https://github.com/JetBrains/ideavim/pull/239) by [citizenmatt](https://github.com/citizenmatt): Use new API for relative line numbers
|
||||
|
||||
0.57, 2020-04-28
|
||||
-------------
|
||||
## 0.57, 2020-04-28
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1992](https://youtrack.jetbrains.com/issue/VIM-1992) Fix mappings to `<S-Letter>`
|
||||
* [VIM-1991](https://youtrack.jetbrains.com/issue/VIM-1991) Fix working with number registers
|
||||
|
||||
**Merged PRs:**
|
||||
### Merged PRs:
|
||||
* [234](https://github.com/JetBrains/ideavim/pull/234) by [runforprogram](https://github.com/runforprogram): [VIM-1991] fix >0 number register not work
|
||||
|
||||
0.56, 2020-04-09
|
||||
--------------
|
||||
## 0.56, 2020-04-09
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* `ReplaceWithRegister` plugin emulation ([ReplaceWithRegister](https://www.vim.org/scripts/script.php?script_id=2703)).
|
||||
* `argtextobj.vim` plugin emulation ([argtextobj.vim](https://vim.sourceforge.io/scripts/script.php?script_id=2699)).
|
||||
* `vim-textobj-entire` plugin emulation ([vim-textobj-entire](https://github.com/kana/vim-textobj-entire)).
|
||||
* [VIM-434](https://youtrack.jetbrains.com/issue/VIM-434) Add `'showcmd'` support, on by default.
|
||||
* Support `ls/buffers/files` commands.
|
||||
|
||||
**Changes:**
|
||||
### Changes:
|
||||
* Replace `ideastatusbar` option with `ideastatusicon`. Now you can make the icon gray.
|
||||
|
||||
**Deprecations:**
|
||||
### Deprecations:
|
||||
* `ideastatusbar` option is deprecated now. See `ideastatusicon`.
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1284](https://youtrack.jetbrains.com/issue/VIM-1284) Fix mapping of digits.
|
||||
* Fix handling of counts on both operator and motion, e.g. `3d2w` deletes 6 words, instead of 32.
|
||||
* Allow mapping of `<C-K>` and `<C-V>`/`<C-Q>`.
|
||||
@@ -149,15 +152,14 @@ To Be Released
|
||||
* [VIM-1911](https://youtrack.jetbrains.com/issue/VIM-1911) Lookup keys respect `IDE` handler.
|
||||
* [VIM-1008](https://youtrack.jetbrains.com/issue/VIM-1008) Correct `ci{` behavior.
|
||||
|
||||
0.55, 2020-01-20
|
||||
--------------
|
||||
## 0.55, 2020-01-20
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* Surround and Commentary extensions support repeating with a dot command ([VIM-1118](https://youtrack.jetbrains.com/issue/VIM-1118))
|
||||
* Support XDG settings standard ([VIM-664](https://youtrack.jetbrains.com/issue/VIM-664))
|
||||
* Add option to remove the status bar icon ([VIM-1847](https://youtrack.jetbrains.com/issue/VIM-1847))
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1823](https://youtrack.jetbrains.com/issue/VIM-1823) Fix multiple carets with ignorecase
|
||||
* [VIM-1053](https://youtrack.jetbrains.com/issue/VIM-1053)
|
||||
[VIM-1038](https://youtrack.jetbrains.com/issue/VIM-1038)
|
||||
@@ -180,21 +182,20 @@ To Be Released
|
||||
* [VIM-1884](https://youtrack.jetbrains.com/issue/VIM-1884) Show quickDoc during popup with `CTRL-J`
|
||||
* [VIM-987](https://youtrack.jetbrains.com/issue/VIM-987) Fix arrow keys for the NEO keyboard
|
||||
|
||||
0.54, 2019-11-20
|
||||
--------------
|
||||
## 0.54, 2019-11-20
|
||||
|
||||
**Features:**
|
||||
### Features:
|
||||
* EasyMotion plugin emulation ([VIM-820](https://youtrack.jetbrains.com/issue/VIM-820) | [Instructions](https://github.com/JetBrains/ideavim#emulated-vim-plugins))
|
||||
* Support surrounding with a function name ([link](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L138))
|
||||
* Add `:delmarks` command ([VIM-1720](https://youtrack.jetbrains.com/issue/VIM-1720))
|
||||
* Add IdeaVim icon to the status bar ([VIM-943](https://youtrack.jetbrains.com/issue/VIM-943))
|
||||
|
||||
**Changes:**
|
||||
### Changes:
|
||||
* Remove the default IdeaVim toggle shortcut (<kbd>CTRL</kbd><kbd>ALT</kbd><kbd>V</kbd>)
|
||||
* Rename `refactoring` value of `selectmode` option to `ideaselection`
|
||||
* Remove `template` value of `selectmode` option and replace it with `idearefactormode` option.
|
||||
|
||||
**Fixes:**
|
||||
### Fixes:
|
||||
* [VIM-1766](https://youtrack.jetbrains.com/issue/VIM-1766) Fix disappearing caret in ex entry on Linux
|
||||
* [VIM-1032](https://youtrack.jetbrains.com/issue/VIM-1032) Annotations work well with relative line numbers enabled
|
||||
* [VIM-1762](https://youtrack.jetbrains.com/issue/VIM-1762) Relative line numbers respect line number theme
|
||||
@@ -221,8 +222,7 @@ To Be Released
|
||||
* [VIM-1604](https://youtrack.jetbrains.com/issue/VIM-1604) Add IdeaVim logo
|
||||
|
||||
|
||||
0.53, 2019-08-07
|
||||
--------------
|
||||
## 0.53, 2019-08-07
|
||||
* [VIM-1711](https://youtrack.jetbrains.com/issue/VIM-1711) Search is not triggered during surround action
|
||||
* [VIM-1712](https://youtrack.jetbrains.com/issue/VIM-1712) Fix `Y` command for visual mode
|
||||
* [VIM-1713](https://youtrack.jetbrains.com/issue/VIM-1713) Surround in visual mode put caret in correct position
|
||||
@@ -233,8 +233,7 @@ To Be Released
|
||||
* [VIM-1736](https://youtrack.jetbrains.com/issue/VIM-1736) Fix `` for ex panel
|
||||
* [VIM-1739](https://youtrack.jetbrains.com/issue/VIM-1739) Fix full-width characters for ex pane
|
||||
|
||||
0.52, 2019-07-23
|
||||
--------------
|
||||
## 0.52, 2019-07-23
|
||||
|
||||
* Introduce [Select Mode](https://github.com/JetBrains/ideavim/wiki/Select-mode).
|
||||
|
||||
@@ -327,8 +326,7 @@ To Be Released
|
||||
* [VIM-1698](https://youtrack.jetbrains.com/issue/VIM-1698) Paste doesn't clear clipboard
|
||||
* [VIM-1359](https://youtrack.jetbrains.com/issue/VIM-1359) Fix behavior of i_CTRL-W action
|
||||
|
||||
0.51, 2019-02-12
|
||||
----------------
|
||||
## 0.51, 2019-02-12
|
||||
|
||||
* [VIM-1558](https://youtrack.jetbrains.com/issue/VIM-1558) Fixed scrolling for code with block inlays in Rider 2018.3
|
||||
* [VIM-1187](https://youtrack.jetbrains.com/issue/VIM-1187) Improved performance of `set relativelinenumber` on large files
|
||||
@@ -336,8 +334,7 @@ To Be Released
|
||||
* [VIM-798](https://youtrack.jetbrains.com/issue/VIM-798) Allow arrow keys for window navigation commands
|
||||
|
||||
|
||||
0.50, 2018-10-18
|
||||
----------------
|
||||
## 0.50, 2018-10-18
|
||||
|
||||
Moved "Vim Emulation" settings into "File | Settings | Vim Emulation". Support
|
||||
for vim-multiple-cursors commands `<A-n>`, `<A-x>`, `<A-p>`, `g<A-n>` (put `set
|
||||
@@ -363,8 +360,7 @@ Vim commands for multiple cursors. Various bug fixes.
|
||||
* [VIM-1274](https://youtrack.jetbrains.com/issue/VIM-1274) Correctly process escaping when `smartcase` is on
|
||||
|
||||
|
||||
0.49, 2017-12-12
|
||||
----------------
|
||||
## 0.49, 2017-12-12
|
||||
|
||||
Enabled zero-latency typing for Vim emulation. Added support for `iskeyword` option. Various bug fixes.
|
||||
|
||||
@@ -372,8 +368,7 @@ Enabled zero-latency typing for Vim emulation. Added support for `iskeyword` opt
|
||||
* [VIM-1367](https://youtrack.jetbrains.com/issue/VIM-1367) Support `iskeyword` option
|
||||
* [VIM-523](https://youtrack.jetbrains.com/issue/VIM-523) Fixed global mark remembering only the line number
|
||||
|
||||
0.48, 2017-01-15
|
||||
----------------
|
||||
## 0.48, 2017-01-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -387,8 +382,7 @@ Features:
|
||||
* Support for zero-latency rendering
|
||||
|
||||
|
||||
0.47, 2016-10-19
|
||||
----------------
|
||||
## 0.47, 2016-10-19
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -398,8 +392,7 @@ Bug fixes:
|
||||
* VIM-1190 Fixed exception "Write access is allowed from write-safe contexts only"
|
||||
|
||||
|
||||
0.46, 2016-07-07
|
||||
----------------
|
||||
## 0.46, 2016-07-07
|
||||
|
||||
Added `incsearch` option for incremental search. Added support for `it` and
|
||||
`at` tag block selection. Added `vim-surround` commands `ys`, `cs`, `ds`,
|
||||
@@ -427,8 +420,7 @@ Bug fixes:
|
||||
* VIM-1126 Fixed warning about modifying shortcuts of global actions for 2016.2
|
||||
|
||||
|
||||
0.44, 2015-11-02
|
||||
----------------
|
||||
## 0.44, 2015-11-02
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -437,16 +429,14 @@ A bugfix release.
|
||||
plugin disabled
|
||||
|
||||
|
||||
0.43, 2015-11-02
|
||||
----------------
|
||||
## 0.43, 2015-11-02
|
||||
|
||||
A bugfix release.
|
||||
|
||||
* VIM-1039 Fixed running the plugin with Java 6
|
||||
|
||||
|
||||
0.42, 2015-11-01
|
||||
----------------
|
||||
## 0.42, 2015-11-01
|
||||
|
||||
This release is compatible with IntelliJ 15+ and other IDEs based on the
|
||||
IntelliJ platform branch 143+.
|
||||
@@ -454,8 +444,7 @@ IntelliJ platform branch 143+.
|
||||
* VIM-970 Fixed move commands in read-only files
|
||||
|
||||
|
||||
0.41, 2015-06-10
|
||||
----------------
|
||||
## 0.41, 2015-06-10
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -463,8 +452,7 @@ A bugfix release.
|
||||
IntelliJ
|
||||
|
||||
|
||||
0.40, 2015-06-09
|
||||
----------------
|
||||
## 0.40, 2015-06-09
|
||||
|
||||
Added support for `mapleader`. Support comments in `%` brace matching. Various
|
||||
bug fixes.
|
||||
@@ -491,8 +479,7 @@ Bug fixes:
|
||||
* VIM-930 Fixed editor focus issues after closing Ex entry box on Oracle Java 6
|
||||
|
||||
|
||||
0.39, 2014-12-03
|
||||
----------------
|
||||
## 0.39, 2014-12-03
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -504,8 +491,7 @@ Bug fixes:
|
||||
* EA-63022 Don't update line numbers in the caret movement event listener
|
||||
|
||||
|
||||
0.38, 2014-12-01
|
||||
----------------
|
||||
## 0.38, 2014-12-01
|
||||
|
||||
Added support for `number` and `relativenumber` options, `clipboard=unnamed`
|
||||
option. Added `:action` and `:actionlist` commands for executing arbitrary
|
||||
@@ -537,8 +523,7 @@ Bug fixes:
|
||||
* VIM-723 Fix pasting to an empty line
|
||||
|
||||
|
||||
0.37, 2014-10-15
|
||||
----------------
|
||||
## 0.37, 2014-10-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -549,8 +534,7 @@ Bug fixes:
|
||||
* VIM-407 Fixed `>>` to work if a line contains only one character
|
||||
|
||||
|
||||
0.36, 2014-10-14
|
||||
----------------
|
||||
## 0.36, 2014-10-14
|
||||
|
||||
Added support for common window splitting and navigation commands. Various bug
|
||||
fixes.
|
||||
@@ -569,8 +553,7 @@ Bug fixes:
|
||||
* VIM-569 Fixed `<C-W>` when the caret is at the end of a line
|
||||
|
||||
|
||||
0.35, 2014-05-15
|
||||
----------------
|
||||
## 0.35, 2014-05-15
|
||||
|
||||
The `~/.vimrc` initialization file is no longer read by default, use
|
||||
`~/.ideavimrc` instead.
|
||||
@@ -591,8 +574,7 @@ Bug fixes:
|
||||
selection
|
||||
|
||||
|
||||
0.34, 2014-04-29
|
||||
----------------
|
||||
## 0.34, 2014-04-29
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -606,8 +588,7 @@ Bug fixes:
|
||||
* VIM-667 Ignore potentially nested lines of .vimrc based on leading whitespace
|
||||
|
||||
|
||||
0.33, 2014-04-28
|
||||
----------------
|
||||
## 0.33, 2014-04-28
|
||||
|
||||
Added support for `:map` key mapping commands. New keyboard shortcuts handler
|
||||
that doesn't require a separate keymap for Vim emulation. Added support for
|
||||
@@ -626,14 +607,12 @@ Bug fixes:
|
||||
* VIM-281 Don't disable global reformat code action for Vim emulation
|
||||
|
||||
|
||||
0.32, 2013-11-15
|
||||
----------------
|
||||
## 0.32, 2013-11-15
|
||||
|
||||
Fixed API compatibility with IntelliJ platform builds 132.1052+.
|
||||
|
||||
|
||||
0.31, 2013-11-12
|
||||
----------------
|
||||
## 0.31, 2013-11-12
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -642,8 +621,7 @@ Bug fixes:
|
||||
* VIM-582 Fixed line comment and reformat commands with no visual selection
|
||||
|
||||
|
||||
0.30, 2013-11-11
|
||||
----------------
|
||||
## 0.30, 2013-11-11
|
||||
|
||||
Added support for a separate `.ideavimrc` config file. Fixed long-standing
|
||||
issues with merged undo/redo commands and `<Esc>` during code completion.
|
||||
@@ -663,8 +641,7 @@ Bug fixes:
|
||||
* Fixed several reported exceptions
|
||||
|
||||
|
||||
0.29, 2013-05-15
|
||||
----------------
|
||||
## 0.29, 2013-05-15
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -675,8 +652,7 @@ Bug fixes:
|
||||
* VIM-121 Don't move cursor while scrolling
|
||||
|
||||
|
||||
0.28, 2013-04-06
|
||||
----------------
|
||||
## 0.28, 2013-04-06
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -686,8 +662,7 @@ Bug fixes:
|
||||
* VIM-479 Don't try to activate insert mode for diff view
|
||||
|
||||
|
||||
0.27, 2013-04-03
|
||||
----------------
|
||||
## 0.27, 2013-04-03
|
||||
|
||||
New Vim keymap generator creates better keymaps, especially for Mac OS X.
|
||||
Restart after reconfiguring the keymap is no longer required.
|
||||
@@ -708,8 +683,7 @@ Bug fixes:
|
||||
* Fixed command window font size to match editor font size
|
||||
|
||||
|
||||
0.26, 2012-12-26
|
||||
----------------
|
||||
## 0.26, 2012-12-26
|
||||
|
||||
Added support for paste in the command mode: from a register using `<C-R>`,
|
||||
from the clipboard using `<S-Insert>` or `<M-V>`. Added support for the last
|
||||
@@ -728,8 +702,7 @@ Bug fixes:
|
||||
* VIM-302 Fixed tab switching order for `gt` and `gT`
|
||||
|
||||
|
||||
0.25, 2012-12-19
|
||||
----------------
|
||||
## 0.25, 2012-12-19
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -738,8 +711,7 @@ A bugfix release.
|
||||
character
|
||||
|
||||
|
||||
0.24, 2012-12-03
|
||||
----------------
|
||||
## 0.24, 2012-12-03
|
||||
|
||||
Added Vim string object selection motions (see help topics `v_i"`, `v_a"`).
|
||||
Various bug fixes.
|
||||
@@ -778,8 +750,7 @@ Bug fixes:
|
||||
* VIM-157 Fixed regression in moving the cursor after `~`
|
||||
|
||||
|
||||
0.23.115, 2012-11-14
|
||||
--------------------
|
||||
## 0.23.115, 2012-11-14
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -788,8 +759,7 @@ A bugfix release.
|
||||
* VIM-112 Delete a single previous word with <C-W> in insert mode, not all inserted words
|
||||
|
||||
|
||||
0.23.111, 2012-11-12
|
||||
--------------------
|
||||
## 0.23.111, 2012-11-12
|
||||
|
||||
A bugfix release.
|
||||
|
||||
@@ -808,8 +778,7 @@ A bugfix release.
|
||||
found
|
||||
|
||||
|
||||
0.23.93, 2012-03-21
|
||||
-------------------
|
||||
## 0.23.93, 2012-03-21
|
||||
|
||||
A bugfix release. Vim.xml was fixed to use Command+C, Command+V on Mac OS.
|
||||
Unfortunately you need to update Vim.xml manually this time.
|
||||
|
23
README.md
23
README.md
@@ -196,17 +196,34 @@ Ex commands or via `:map` command mappings:
|
||||
* `:action {name}`
|
||||
* Execute an action named `NAME`
|
||||
|
||||
In addition to `:actionlist` command, IdeaVim provides `IdeaVim: track action Ids` option to
|
||||
extract the ids of executed command. This option can be found in "Search everywhere" (double `shift`). **[To Be Released]**
|
||||
|
||||
<details>
|
||||
<summary><strong>"Track aciton Ids" Details</strong> (click to see)</summary>
|
||||
<img src="resources/readme/track_action_id.gif" alt="track actioin ids"/>
|
||||
</details>
|
||||
|
||||
For the mappings you can use a special `<Action>` keyword. Use `<Action>(*action_id*)` to map keys to some action. Don't
|
||||
forget the parentheses. This keyword works for insert mode as well. **[To Be Released]**
|
||||
|
||||
Examples:
|
||||
|
||||
```vim
|
||||
" Map \r to the Reformat Code action
|
||||
:map \r :action ReformatCode<CR>
|
||||
:map \r :action ReformatCode<CR>
|
||||
" or
|
||||
:map \r <Action>(ReformatCode) " [To Be Released]
|
||||
|
||||
" Map <leader>d to start debug
|
||||
:map <leader>d :action Debug<CR>
|
||||
:map <leader>d :action Debug<CR>
|
||||
" or
|
||||
:map <leader>d <Action>(Debug) " [To Be Released]
|
||||
|
||||
" Map \b to toggle the breakpoint on the current line
|
||||
:map \b :action ToggleLineBreakpoint<CR>
|
||||
:map \b :action ToggleLineBreakpoint<CR>
|
||||
" or
|
||||
:map \b <Action>(ToggleLineBreakpoint) " [To Be Released]
|
||||
```
|
||||
|
||||
### Undo/Redo
|
||||
|
66
build.gradle
66
build.gradle
@@ -9,7 +9,9 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.intellij' version '0.4.18'
|
||||
id 'org.jetbrains.intellij' version '0.5.0'
|
||||
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
||||
id "org.jetbrains.changelog" version "0.6.2"
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
@@ -48,6 +50,7 @@ intellij {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -69,20 +72,43 @@ compileTestKotlin {
|
||||
}
|
||||
}
|
||||
|
||||
task testWithNeovim(type : Test) {
|
||||
detekt {
|
||||
config = files("./detekt/config.yaml")
|
||||
baseline = file("${rootProject.projectDir}/detekt/baseline.xml")
|
||||
input = files("src")
|
||||
|
||||
buildUponDefaultConfig = true
|
||||
|
||||
reports {
|
||||
html.enabled = false
|
||||
xml.enabled = false
|
||||
txt.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
tasks.detekt.jvmTarget = javaVersion
|
||||
|
||||
task testWithNeovim(type: Test) {
|
||||
group = "verification"
|
||||
systemProperty "ideavim.neovim.test", 'true'
|
||||
}
|
||||
|
||||
changelog {
|
||||
groups = ["Features:", "Changes:", "Deprecations:", "Fixes:", "Merged PRs:"]
|
||||
itemPrefix = "*"
|
||||
path = "${project.projectDir}/CHANGES.md"
|
||||
unreleasedTerm = "To Be Released"
|
||||
headerParserRegex = /0\.\d{2}(.\d+)?/
|
||||
// header = { "${project.version}" }
|
||||
// version = "0.60"
|
||||
}
|
||||
|
||||
tasks.register("slackEapNotification") {
|
||||
doLast {
|
||||
if (!slackUrl) return
|
||||
def post = new URL(slackUrl).openConnection()
|
||||
def changeLog = extractChangelog()
|
||||
changeLog = changeLog.replace("* ", "• ") // Replace stars with bullets
|
||||
changeLog = changeLog.replace("**", "*") // Enable bold text
|
||||
changeLog = changeLog.replaceAll("\\[([^]]+)]\\(([^)]+)\\)", '<$2|$1>') // Enable links
|
||||
def message ="""
|
||||
def changeLog = changelog.getUnreleased().toPlainText()
|
||||
def message = """
|
||||
{
|
||||
"text": "New version of IdeaVim",
|
||||
"blocks": [
|
||||
@@ -102,32 +128,8 @@ tasks.register("slackEapNotification") {
|
||||
post.getOutputStream().write(message.getBytes("UTF-8"))
|
||||
def postRC = post.getResponseCode()
|
||||
println(postRC)
|
||||
if(postRC == 200) {
|
||||
if (postRC == 200) {
|
||||
println(post.getInputStream().getText())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Very primitive changelog extraction code
|
||||
def extractChangelog() {
|
||||
def startLine = "_Available since $version EAP:_"
|
||||
def endLine = "_To Be Released..._"
|
||||
def startSaving = false
|
||||
def res = new StringBuilder()
|
||||
new File("./CHANGES.md").eachLine { line ->
|
||||
if (startSaving) {
|
||||
if (line == endLine) {
|
||||
startSaving = false
|
||||
}
|
||||
else {
|
||||
res.append(line).append('\n')
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (line == startLine) {
|
||||
startSaving = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return res.toString()
|
||||
}
|
||||
|
374
detekt/baseline.xml
Normal file
374
detekt/baseline.xml
Normal file
@@ -0,0 +1,374 @@
|
||||
<?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>
|
25
detekt/config.yaml
Normal file
25
detekt/config.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
formatting:
|
||||
Indentation:
|
||||
indentSize: 2
|
||||
continuationIndentSize: 8
|
||||
ParameterListWrapping:
|
||||
indentSize: 8
|
||||
complexity:
|
||||
LongParameterList:
|
||||
functionThreshold: 12
|
||||
NestedBlockDepth:
|
||||
threshold: 6
|
||||
ComplexCondition:
|
||||
threshold: 6
|
||||
exceptions:
|
||||
TooGenericExceptionCaught:
|
||||
active: false
|
||||
naming:
|
||||
ClassNaming:
|
||||
excludes: "**/ConfigurationMigrators.kt, **/VersionDetectors.kt"
|
||||
performance:
|
||||
SpreadOperator:
|
||||
active: false
|
||||
style:
|
||||
ForbiddenComment:
|
||||
active: false
|
@@ -120,7 +120,7 @@ The following `:set` commands can appear in `~/.ideavimrc` or be set manually in
|
||||
- gray - use the gray version of the icon
|
||||
- disabled - hide the icon
|
||||
|
||||
`ideawrite` `ideawrite` String (default "all") [To Be Released]
|
||||
`ideawrite` `ideawrite` String (default "all")
|
||||
"file" or "all". Defines the behaviour of ":w" command.
|
||||
Value "all" enables execution of ":wa" (save all) command on ":w" (save).
|
||||
This feature exists because some IJ options like "Prettier on save" or "ESlint on save"
|
||||
|
@@ -4,7 +4,7 @@ ideaVersion=LATEST-EAP-SNAPSHOT
|
||||
downloadIdeaSources=true
|
||||
instrumentPluginCode=true
|
||||
version=SNAPSHOT
|
||||
javaVersion=11
|
||||
javaVersion=1.8
|
||||
kotlinVersion=1.3.71
|
||||
publishUsername=username
|
||||
publishToken=token
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
||||
#Thu Jun 25 19:36:41 MSK 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
2
gradlew
vendored
2
gradlew
vendored
@@ -82,6 +82,7 @@ esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
@@ -129,6 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
1
gradlew.bat
vendored
1
gradlew.bat
vendored
@@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
|
@@ -3,8 +3,9 @@
|
||||
<id>IdeaVIM</id>
|
||||
<change-notes><![CDATA[
|
||||
<ul>
|
||||
<li>Support of `virtualedit=onemore`</li>
|
||||
<li>A lot of fixes for scrolling</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>
|
||||
</ul>
|
||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||
]]></change-notes>
|
||||
|
BIN
resources/readme/track_action_id.gif
Normal file
BIN
resources/readme/track_action_id.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
@@ -29,6 +29,7 @@ import com.intellij.openapi.command.UndoConfirmationPolicy;
|
||||
import com.intellij.openapi.editor.Caret;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext;
|
||||
import com.intellij.openapi.editor.actionSystem.DocCommandGroupId;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -300,7 +301,7 @@ public class KeyHandler {
|
||||
return node;
|
||||
}
|
||||
|
||||
private static <T> boolean isPrefix(@NotNull List<T> list1, @NotNull List<T> list2) {
|
||||
public static <T> boolean isPrefix(@NotNull List<T> list1, @NotNull List<T> list2) {
|
||||
if (list1.size() > list2.size()) {
|
||||
return false;
|
||||
}
|
||||
@@ -392,7 +393,7 @@ public class KeyHandler {
|
||||
}
|
||||
|
||||
for (KeyStroke keyStroke : unhandledKeys) {
|
||||
handleKey(editor, keyStroke, new EditorDataContext(editor), false);
|
||||
handleKey(editor, keyStroke, new EditorDataContext(editor, null), false);
|
||||
}
|
||||
}, ModalityState.stateForComponent(editor.getComponent())));
|
||||
}
|
||||
@@ -435,80 +436,9 @@ public class KeyHandler {
|
||||
|
||||
mappingState.resetMappingSequence();
|
||||
|
||||
final EditorDataContext currentContext = new EditorDataContext(editor);
|
||||
final EditorDataContext currentContext = new EditorDataContext(editor, context);
|
||||
|
||||
if (mappingInfo instanceof ToKeysMappingInfo) {
|
||||
final List<KeyStroke> toKeys = ((ToKeysMappingInfo)mappingInfo).getToKeys();
|
||||
final boolean fromIsPrefix = isPrefix(mappingInfo.getFromKeys(), toKeys);
|
||||
boolean first = true;
|
||||
for (KeyStroke keyStroke : toKeys) {
|
||||
final boolean recursive = mappingInfo.isRecursive() && !(first && fromIsPrefix);
|
||||
handleKey(editor, keyStroke, currentContext, recursive);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
else if (mappingInfo instanceof ToHandlerMappingInfo) {
|
||||
final VimExtensionHandler extensionHandler = ((ToHandlerMappingInfo)mappingInfo).getExtensionHandler();
|
||||
final CommandProcessor processor = CommandProcessor.getInstance();
|
||||
|
||||
// Cache isOperatorPending in case the extension changes the mode while moving the caret
|
||||
// See CommonExtensionTest
|
||||
// TODO: Is this legal? Should we assert in this case?
|
||||
final boolean shouldCalculateOffsets = commandState.isOperatorPending();
|
||||
|
||||
Map<Caret, Integer> startOffsets =
|
||||
editor.getCaretModel().getAllCarets().stream().collect(Collectors.toMap(Function.identity(), Caret::getOffset));
|
||||
|
||||
if (extensionHandler.isRepeatable()) {
|
||||
VimRepeater.Extension.INSTANCE.clean();
|
||||
}
|
||||
|
||||
processor.executeCommand(editor.getProject(), () -> extensionHandler.execute(editor, context),
|
||||
"Vim " + extensionHandler.getClass().getSimpleName(), null);
|
||||
|
||||
if (extensionHandler.isRepeatable()) {
|
||||
VimRepeater.Extension.INSTANCE.setLastExtensionHandler(extensionHandler);
|
||||
VimRepeater.Extension.INSTANCE.setArgumentCaptured(null);
|
||||
VimRepeater.INSTANCE.setRepeatHandler(true);
|
||||
}
|
||||
|
||||
if (shouldCalculateOffsets && !commandState.getCommandBuilder().hasCurrentCommandPartArgument()) {
|
||||
Map<Caret, VimSelection> offsets = new HashMap<>();
|
||||
|
||||
for (Caret caret : editor.getCaretModel().getAllCarets()) {
|
||||
@Nullable Integer startOffset = startOffsets.get(caret);
|
||||
if (caret.hasSelection()) {
|
||||
final VimSelection vimSelection = VimSelection.Companion
|
||||
.create(UserDataManager.getVimSelectionStart(caret), caret.getOffset(),
|
||||
SelectionType.fromSubMode(CommandStateHelper.getSubMode(editor)), editor);
|
||||
offsets.put(caret, vimSelection);
|
||||
commandState.popModes();
|
||||
}
|
||||
else if (startOffset != null && startOffset != caret.getOffset()) {
|
||||
// Command line motions are always characterwise exclusive
|
||||
int endOffset = caret.getOffset();
|
||||
if (startOffset < endOffset) {
|
||||
endOffset -= 1;
|
||||
} else {
|
||||
startOffset -= 1;
|
||||
}
|
||||
final VimSelection vimSelection = VimSelection.Companion
|
||||
.create(startOffset, endOffset, SelectionType.CHARACTER_WISE, editor);
|
||||
offsets.put(caret, vimSelection);
|
||||
|
||||
try (VimListenerSuppressor.Locked ignored = SelectionVimListenerSuppressor.INSTANCE.lock()) {
|
||||
// Move caret to the initial offset for better undo action
|
||||
// This is not a necessary thing, but without it undo action look less convenient
|
||||
editor.getCaretModel().moveToOffset(startOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!offsets.isEmpty()) {
|
||||
commandState.getCommandBuilder().completeCommandPart(new Argument(offsets));
|
||||
}
|
||||
}
|
||||
}
|
||||
mappingInfo.execute(editor, context);
|
||||
|
||||
// If we've just evaluated the previous key sequence, make sure to also handle the current key
|
||||
if (mappingInfo != currentMappingInfo) {
|
||||
|
@@ -25,7 +25,9 @@ import com.intellij.openapi.project.Project
|
||||
|
||||
@Service
|
||||
class VimProjectService(val project: Project) : Disposable {
|
||||
override fun dispose() {}
|
||||
override fun dispose() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
@@ -61,7 +61,7 @@ class VimTypedActionHandler(origHandler: TypedActionHandler?) : TypedActionHandl
|
||||
try {
|
||||
val modifiers = if (charTyped == ' ' && VimKeyListener.isSpaceShift) KeyEvent.SHIFT_DOWN_MASK else 0
|
||||
val keyStroke = KeyStroke.getKeyStroke(charTyped, modifiers)
|
||||
handler.handleKey(editor, keyStroke, EditorDataContext(editor))
|
||||
handler.handleKey(editor, keyStroke, EditorDataContext(editor, context))
|
||||
} catch (e: Throwable) {
|
||||
logger.error(e)
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
}
|
||||
// Should we use HelperKt.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||
try {
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor))
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, EditorDataContext(editor, e.dataContext))
|
||||
} catch (ignored: ProcessCanceledException) {
|
||||
// Control-flow exceptions (like ProcessCanceledException) should never be logged
|
||||
// See {@link com.intellij.openapi.diagnostic.Logger.checkException}
|
||||
@@ -84,7 +84,7 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
if (editor != null && keyStroke != null) {
|
||||
if (editor.isIdeaVimDisabledHere) return false
|
||||
// Workaround for smart step into
|
||||
@Suppress("DEPRECATION")
|
||||
@Suppress("DEPRECATION", "LocalVariableName", "VariableNaming")
|
||||
val SMART_STEP_INPLACE_DATA = Key.findKeyByName("SMART_STEP_INPLACE_DATA")
|
||||
if (SMART_STEP_INPLACE_DATA != null && editor.getUserData(SMART_STEP_INPLACE_DATA) != null) return false
|
||||
|
||||
@@ -123,8 +123,9 @@ class VimShortcutKeyAction : AnAction(), DumbAware {
|
||||
}
|
||||
|
||||
private fun isEnabledForEscape(editor: Editor): Boolean {
|
||||
return (editor.isPrimaryEditor() || EditorHelper.isFileEditor(editor) && !editor.inNormalMode) ||
|
||||
(OptionsManager.dialogescape.value == "on" && !editor.inNormalMode)
|
||||
return editor.isPrimaryEditor()
|
||||
|| EditorHelper.isFileEditor(editor) && !editor.inNormalMode
|
||||
|| OptionsManager.dialogescape.value == "on" && !editor.inNormalMode
|
||||
}
|
||||
|
||||
private fun isShortcutConflict(keyStroke: KeyStroke): Boolean {
|
||||
|
@@ -24,7 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.handler.ShiftedArrowKeyHandler
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.vimForEachCaret
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
|
@@ -24,7 +24,8 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.handler.ShiftedArrowKeyHandler
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.vimForEachCaret
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
|
@@ -21,8 +21,10 @@ import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.diagnostic.debug
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.action.motion.updown.*
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.DigraphResult
|
||||
import com.maddyhome.idea.vim.helper.DigraphSequence
|
||||
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
|
||||
|
@@ -31,6 +31,7 @@ import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
|
||||
class CopyTextHandler : CommandHandler.SingleExecution() {
|
||||
override val argFlags = flags(RangeFlag.RANGE_OPTIONAL, ArgumentFlag.ARGUMENT_REQUIRED, Access.WRITABLE)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean {
|
||||
val carets = EditorHelper.getOrderedCaretsList(editor)
|
||||
for (caret in carets) {
|
||||
@@ -42,7 +43,7 @@ class CopyTextHandler : CommandHandler.SingleExecution() {
|
||||
|
||||
val transferableData = VimPlugin.getRegister().getTransferableData(editor, range, text)
|
||||
val textData = PutData.TextData(text, SelectionType.LINE_WISE, transferableData)
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, _indent = true, caretAfterInsertedText = false, putToLine = line)
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = true, caretAfterInsertedText = false, putToLine = line)
|
||||
VimPlugin.getPut().putTextForCaret(editor, caret, context, putData)
|
||||
}
|
||||
return true
|
||||
|
@@ -45,7 +45,7 @@ class EditFileHandler : CommandHandler.SingleExecution() {
|
||||
}
|
||||
|
||||
// Don't open a choose file dialog under a write action
|
||||
ApplicationManager.getApplication().invokeLater { KeyHandler.executeAction("OpenFile", EditorDataContext(editor)) }
|
||||
ApplicationManager.getApplication().invokeLater { KeyHandler.executeAction("OpenFile", EditorDataContext(editor, context)) }
|
||||
|
||||
return true
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ class MoveTextHandler : CommandHandler.SingleExecution() {
|
||||
val text = texts[i]
|
||||
|
||||
val textData = PutData.TextData(text, SelectionType.LINE_WISE, emptyList())
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, _indent = true, caretAfterInsertedText = false, putToLine = line)
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = true, caretAfterInsertedText = false, putToLine = line)
|
||||
VimPlugin.getPut().putTextForCaret(editor, caret, context, putData)
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,7 @@ class PutLinesHandler : CommandHandler.SingleExecution() {
|
||||
|
||||
val line = if (cmd.ranges.size() == 0) -1 else cmd.getLine(editor)
|
||||
val textData = registerGroup.lastRegister?.let { PutData.TextData(it.text ?: StringHelper.toKeyNotation(it.keys), SelectionType.LINE_WISE, it.transferableData) }
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, _indent = false, caretAfterInsertedText = false, putToLine = line)
|
||||
val putData = PutData(textData, null, 1, insertTextBeforeCaret = false, rawIndent = false, caretAfterInsertedText = false, putToLine = line)
|
||||
return VimPlugin.getPut().putText(editor, context, putData)
|
||||
}
|
||||
}
|
||||
|
@@ -98,8 +98,7 @@ object VimExtensionFacade {
|
||||
fun inputKeyStroke(editor: Editor): KeyStroke {
|
||||
if (editor.commandState.isDotRepeatInProgress) {
|
||||
val input = VimRepeater.Extension.consumeKeystroke()
|
||||
return input
|
||||
?: throw RuntimeException("Not enough keystrokes saved: ${VimRepeater.Extension.lastExtensionHandler}")
|
||||
return input ?: error("Not enough keystrokes saved: ${VimRepeater.Extension.lastExtensionHandler}")
|
||||
}
|
||||
|
||||
val key: KeyStroke? = if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||
@@ -122,7 +121,7 @@ object VimExtensionFacade {
|
||||
fun inputString(editor: Editor, prompt: String, finishOn: Char?): String {
|
||||
if (editor.commandState.isDotRepeatInProgress) {
|
||||
val input = VimRepeater.Extension.consumeString()
|
||||
return input ?: throw RuntimeException("Not enough strings saved: ${VimRepeater.Extension.lastExtensionHandler}")
|
||||
return input ?: error("Not enough strings saved: ${VimRepeater.Extension.lastExtensionHandler}")
|
||||
}
|
||||
|
||||
if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||
|
@@ -43,9 +43,13 @@ import com.maddyhome.idea.vim.extension.VimExtensionFacade.setOperatorFunction
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionFacade.setRegister
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler
|
||||
import com.maddyhome.idea.vim.group.MarkGroup
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.parseKeys
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.stringToKeys
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
import com.maddyhome.idea.vim.helper.moveToInlayAwareLogicalPosition
|
||||
import com.maddyhome.idea.vim.helper.moveToInlayAwareOffset
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.key.OperatorFunction
|
||||
|
||||
/**
|
||||
@@ -59,7 +63,7 @@ import com.maddyhome.idea.vim.key.OperatorFunction
|
||||
* It just won't work if the binding is defined after `set exchange`.
|
||||
*/
|
||||
|
||||
class VimExchangeExtension: VimExtension {
|
||||
class VimExchangeExtension : VimExtension {
|
||||
override fun getName() = "exchange"
|
||||
|
||||
override fun init() {
|
||||
@@ -105,17 +109,17 @@ class VimExchangeExtension: VimExtension {
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
setOperatorFunction(Operator(false))
|
||||
executeNormalWithoutMapping(parseKeys(if(isLine) "g@_" else "g@"), editor)
|
||||
executeNormalWithoutMapping(parseKeys(if (isLine) "g@_" else "g@"), editor)
|
||||
}
|
||||
}
|
||||
|
||||
private class ExchangeClearHandler: VimExtensionHandler {
|
||||
private class ExchangeClearHandler : VimExtensionHandler {
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
clearExchange(editor)
|
||||
}
|
||||
}
|
||||
|
||||
private class VExchangeHandler: VimExtensionHandler {
|
||||
private class VExchangeHandler : VimExtensionHandler {
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
runWriteAction {
|
||||
val subMode = editor.subMode
|
||||
@@ -126,19 +130,19 @@ class VimExchangeExtension: VimExtension {
|
||||
}
|
||||
}
|
||||
|
||||
private class Operator(private val isVisual: Boolean): OperatorFunction {
|
||||
private class Operator(private val isVisual: Boolean) : OperatorFunction {
|
||||
fun Editor.getMarkOffset(mark: Mark) = EditorHelper.getOffset(this, mark.logicalLine, mark.col)
|
||||
fun CommandState.SubMode.getString() = when(this) {
|
||||
fun CommandState.SubMode.getString() = when (this) {
|
||||
CommandState.SubMode.VISUAL_CHARACTER -> "v"
|
||||
CommandState.SubMode.VISUAL_LINE -> "V"
|
||||
CommandState.SubMode.VISUAL_BLOCK -> "\\<C-V>"
|
||||
else -> throw Error("Invalid SubMode: $this")
|
||||
else -> error("Invalid SubMode: $this")
|
||||
}
|
||||
|
||||
override fun apply(editor: Editor, context: DataContext, selectionType: SelectionType): Boolean {
|
||||
fun highlightExchange(ex: Exchange): RangeHighlighter {
|
||||
val attributes = editor.colorsScheme.getAttributes(EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES)
|
||||
val hlArea = when(ex.type) {
|
||||
val hlArea = when (ex.type) {
|
||||
CommandState.SubMode.VISUAL_LINE -> HighlighterTargetArea.LINES_IN_RANGE
|
||||
// TODO: handle other modes
|
||||
else -> HighlighterTargetArea.EXACT_RANGE
|
||||
@@ -151,6 +155,7 @@ class VimExchangeExtension: VimExtension {
|
||||
hlArea
|
||||
)
|
||||
}
|
||||
|
||||
val currentExchange = getExchange(editor, isVisual, selectionType)
|
||||
val exchange1 = editor.getUserData(EXCHANGE_KEY)
|
||||
if (exchange1 == null) {
|
||||
@@ -162,7 +167,7 @@ class VimExchangeExtension: VimExtension {
|
||||
val cmp = compareExchanges(exchange1, currentExchange)
|
||||
var reverse = false
|
||||
var expand = false
|
||||
val (ex1, ex2) = when(cmp) {
|
||||
val (ex1, ex2) = when (cmp) {
|
||||
ExchangeCompareResult.OVERLAP -> return false
|
||||
ExchangeCompareResult.OUTER -> {
|
||||
reverse = true
|
||||
@@ -189,25 +194,27 @@ class VimExchangeExtension: VimExtension {
|
||||
|
||||
private fun exchange(editor: Editor, ex1: Exchange, ex2: Exchange, reverse: Boolean, expand: Boolean) {
|
||||
fun pasteExchange(sourceExchange: Exchange, targetExchange: Exchange) {
|
||||
VimPlugin.getMark().setChangeMarks(editor, TextRange(editor.getMarkOffset(targetExchange.start), editor.getMarkOffset(targetExchange.end)+1))
|
||||
VimPlugin.getMark().setChangeMarks(editor, TextRange(editor.getMarkOffset(targetExchange.start), editor.getMarkOffset(targetExchange.end) + 1))
|
||||
// do this instead of direct text manipulation to set change marks
|
||||
setRegister('z', stringToKeys(sourceExchange.text), SelectionType.fromSubMode(sourceExchange.type))
|
||||
executeNormalWithoutMapping(stringToKeys("`[${targetExchange.type.getString()}`]\"zp"), editor)
|
||||
}
|
||||
|
||||
fun fixCursor(ex1: Exchange, ex2: Exchange, reverse: Boolean) {
|
||||
val primaryCaret = editor.caretModel.primaryCaret
|
||||
if(reverse) {
|
||||
if (reverse) {
|
||||
primaryCaret.moveToInlayAwareOffset(editor.getMarkOffset(ex1.start))
|
||||
} else {
|
||||
if (ex1.start.logicalLine == ex2.start.logicalLine) {
|
||||
val horizontalOffset = ex1.end.col - ex2.end.col
|
||||
primaryCaret.moveToInlayAwareLogicalPosition(LogicalPosition(ex1.start.logicalLine, ex1.start.col - horizontalOffset))
|
||||
} else if(ex1.end.logicalLine - ex1.start.logicalLine != ex2.end.logicalLine - ex2.start.logicalLine) {
|
||||
} else if (ex1.end.logicalLine - ex1.start.logicalLine != ex2.end.logicalLine - ex2.start.logicalLine) {
|
||||
val verticalOffset = ex1.end.logicalLine - ex2.end.logicalLine
|
||||
primaryCaret.moveToInlayAwareLogicalPosition(LogicalPosition(ex1.start.logicalLine - verticalOffset, ex1.start.col))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val zRegText = getRegister('z')
|
||||
val unnRegText = getRegister('"')
|
||||
val startRegText = getRegister('*')
|
||||
@@ -257,12 +264,12 @@ class VimExchangeExtension: VimExtension {
|
||||
ExchangeCompareResult.GT
|
||||
}
|
||||
}
|
||||
} else if (comparePos(x.start, y.start) <=0 && comparePos(x.end, y.end) >=0) {
|
||||
} else if (comparePos(x.start, y.start) <= 0 && comparePos(x.end, y.end) >= 0) {
|
||||
ExchangeCompareResult.OUTER
|
||||
} else if (comparePos(y.start, x.start) <=0 && comparePos(y.end, x.end) >=0) {
|
||||
} else if (comparePos(y.start, x.start) <= 0 && comparePos(y.end, x.end) >= 0) {
|
||||
ExchangeCompareResult.INNER
|
||||
} else if (comparePos(x.start, y.end) <=0 && comparePos(y.start, x.end) <=0 ||
|
||||
comparePos(y.start, x.end) <=0 && comparePos(x.start, y.end) <=0
|
||||
} else if (comparePos(x.start, y.end) <= 0 && comparePos(y.start, x.end) <= 0 ||
|
||||
comparePos(y.start, x.end) <= 0 && comparePos(x.start, y.end) <= 0
|
||||
) {
|
||||
ExchangeCompareResult.OVERLAP
|
||||
} else {
|
||||
@@ -291,6 +298,7 @@ class VimExchangeExtension: VimExtension {
|
||||
selectionEnd.col
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: improve KeyStroke list to sting conversion
|
||||
fun getRegisterText(reg: Char): String = getRegister(reg)?.map { it.keyChar }?.joinToString("") ?: ""
|
||||
fun getMarks(isVisual: Boolean): Pair<Mark, Mark> {
|
||||
|
@@ -140,7 +140,7 @@ class ReplaceWithRegister : VimExtension {
|
||||
|
||||
val textData = PutData.TextData(usedText, usedType, savedRegister.transferableData)
|
||||
|
||||
val putData = PutData(textData, visualSelection, 1, insertTextBeforeCaret = true, _indent = true, caretAfterInsertedText = false, putToLine = -1)
|
||||
val putData = PutData(textData, visualSelection, 1, insertTextBeforeCaret = true, rawIndent = true, caretAfterInsertedText = false, putToLine = -1)
|
||||
VimPlugin.getPut().putText(editor, EditorDataContext(editor), putData)
|
||||
|
||||
VimPlugin.getRegister().saveRegister(savedRegister.name, savedRegister)
|
||||
|
@@ -214,7 +214,7 @@ public class EditorGroup implements PersistentStateComponent<Element> {
|
||||
if (!EditorHelper.isFileEditor(editor) &&
|
||||
editor.getDocument().isWritable() &&
|
||||
!CommandStateHelper.inInsertMode(editor)) {
|
||||
VimPlugin.getChange().insertBeforeCursor(editor, new EditorDataContext(editor));
|
||||
VimPlugin.getChange().insertBeforeCursor(editor, new EditorDataContext(editor, null));
|
||||
KeyHandler.getInstance().reset(editor);
|
||||
}
|
||||
editor.getSettings().setBlockCursor(!CommandStateHelper.inInsertMode(editor));
|
||||
|
@@ -130,7 +130,7 @@ public class FileGroup {
|
||||
return res;
|
||||
}
|
||||
final Ref<VirtualFile> result = Ref.create();
|
||||
final VirtualFileVisitor<Object> visitor = new VirtualFileVisitor<>() {
|
||||
final VirtualFileVisitor<Object> visitor = new VirtualFileVisitor<Object>() {
|
||||
@Override
|
||||
public boolean visitFile(@NotNull VirtualFile file) {
|
||||
if (file.getName().equals(filename)) {
|
||||
|
@@ -105,15 +105,7 @@ public class KeyGroup implements PersistentStateComponent<Element> {
|
||||
builder.append(" ");
|
||||
builder.append(mappingInfo.isRecursive() ? " " : "*");
|
||||
builder.append(" ");
|
||||
if (mappingInfo instanceof ToKeysMappingInfo) {
|
||||
List<KeyStroke> toKeys = ((ToKeysMappingInfo)mappingInfo).getToKeys();
|
||||
builder.append(toKeyNotation(toKeys));
|
||||
}
|
||||
else if (mappingInfo instanceof ToHandlerMappingInfo) {
|
||||
final VimExtensionHandler extensionHandler = ((ToHandlerMappingInfo)mappingInfo).getExtensionHandler();
|
||||
builder.append("call ");
|
||||
builder.append(extensionHandler.getClass().getCanonicalName());
|
||||
}
|
||||
builder.append(mappingInfo.getPresentableString());
|
||||
builder.append("\n");
|
||||
}
|
||||
ExOutputModel.getInstance(editor).output(builder.toString());
|
||||
|
@@ -162,11 +162,10 @@ class NotificationService(private val project: Project?) {
|
||||
it.whenExpired { notification = null }
|
||||
it.setContent(it.content + "<br><br><small>Use Event Log to see previous ids</small>")
|
||||
|
||||
val copyActionId = CopyActionId(id, project)
|
||||
copyActionId.templatePresentation.isEnabled = id != null
|
||||
it.addAction(copyActionId)
|
||||
|
||||
it.addAction(StopTracking())
|
||||
|
||||
if (id != null) it.addAction(CopyActionId(id, project))
|
||||
|
||||
it.notify(project)
|
||||
}
|
||||
}
|
||||
|
@@ -209,7 +209,7 @@ public class SearchGroup implements PersistentStateComponent<Element> {
|
||||
else {
|
||||
// XXX: The Ex entry panel is used only for UI here, its logic might be inappropriate for this method
|
||||
final ExEntryPanel exEntryPanel = ExEntryPanel.getInstanceWithoutShortcuts();
|
||||
exEntryPanel.activate(editor, new EditorDataContext(editor), "Replace with " + match + " (y/n/a/q/l)?", "", 1);
|
||||
exEntryPanel.activate(editor, new EditorDataContext(editor, null), "Replace with " + match + " (y/n/a/q/l)?", "", 1);
|
||||
MotionGroup.moveCaret(editor, caret, startoff);
|
||||
ModalEntry.INSTANCE.activate(keyStrokeProcessor);
|
||||
exEntryPanel.deactivate(true, false);
|
||||
|
@@ -64,12 +64,12 @@ data class PutData(
|
||||
val visualSelection: VisualSelection?,
|
||||
val count: Int,
|
||||
val insertTextBeforeCaret: Boolean,
|
||||
private val _indent: Boolean,
|
||||
private val rawIndent: Boolean,
|
||||
val caretAfterInsertedText: Boolean,
|
||||
val putToLine: Int = -1
|
||||
) {
|
||||
val indent: Boolean =
|
||||
if (_indent && textData?.typeInRegister != SelectionType.LINE_WISE && visualSelection?.typeInEditor != SelectionType.LINE_WISE) false else _indent
|
||||
if (rawIndent && textData?.typeInRegister != SelectionType.LINE_WISE && visualSelection?.typeInEditor != SelectionType.LINE_WISE) false else rawIndent
|
||||
|
||||
data class VisualSelection(
|
||||
val caretsAndSelections: Map<Caret, VimSelection>,
|
||||
|
@@ -32,6 +32,7 @@ import com.maddyhome.idea.vim.helper.inInsertMode
|
||||
import com.maddyhome.idea.vim.helper.inNormalMode
|
||||
import com.maddyhome.idea.vim.helper.inSelectMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||
import com.maddyhome.idea.vim.helper.isTemplateActive
|
||||
import com.maddyhome.idea.vim.helper.mode
|
||||
import com.maddyhome.idea.vim.helper.popAllModes
|
||||
@@ -52,6 +53,8 @@ object IdeaSelectionControl {
|
||||
fun controlNonVimSelectionChange(editor: Editor, selectionSource: VimListenerManager.SelectionSource = VimListenerManager.SelectionSource.OTHER) {
|
||||
VimVisualTimer.singleTask(editor.mode) { initialMode ->
|
||||
|
||||
if (editor.isIdeaVimDisabledHere) return@singleTask
|
||||
|
||||
logger.info("Adjust non-vim selection. Source: $selectionSource")
|
||||
|
||||
// Perform logic in one of the next cases:
|
||||
@@ -112,7 +115,7 @@ object IdeaSelectionControl {
|
||||
CommandState.Mode.SELECT -> VimPlugin.getVisualMotion().enterSelectMode(editor, VimPlugin.getVisualMotion().autodetectVisualSubmode(editor))
|
||||
CommandState.Mode.INSERT -> VimPlugin.getChange().insertBeforeCursor(editor, EditorDataContext(editor))
|
||||
CommandState.Mode.COMMAND -> Unit
|
||||
else -> throw RuntimeException("Unexpected mode: $mode")
|
||||
else -> error("Unexpected mode: $mode")
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -110,7 +110,7 @@ sealed class VimSimpleSelection : VimSelection() {
|
||||
when (type) {
|
||||
CHARACTER_WISE -> VimCharacterSelection(vimStart, vimEnd, nativeStart, nativeEnd, editor)
|
||||
LINE_WISE -> VimLineSelection(vimStart, vimEnd, nativeStart, nativeEnd, editor)
|
||||
BLOCK_WISE -> throw RuntimeException("This method works only for line and character selection")
|
||||
BLOCK_WISE -> error("This method works only for line and character selection")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,18 @@ import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.command.CommandState
|
||||
import com.maddyhome.idea.vim.group.ChangeGroup
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.fileSize
|
||||
import com.maddyhome.idea.vim.helper.inBlockSubMode
|
||||
import com.maddyhome.idea.vim.helper.inSelectMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import com.maddyhome.idea.vim.helper.mode
|
||||
import com.maddyhome.idea.vim.helper.moveToInlayAwareOffset
|
||||
import com.maddyhome.idea.vim.helper.sort
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
@@ -51,10 +62,8 @@ fun Caret.vimSetSelection(start: Int, end: Int = start, moveCaretToSelectionEnd:
|
||||
* @see vimMoveBlockSelectionToOffset for blockwise selection
|
||||
*/
|
||||
fun Caret.vimMoveSelectionToCaret() {
|
||||
if (!editor.inVisualMode && !editor.inSelectMode)
|
||||
throw RuntimeException("Attempt to extent selection in non-visual mode")
|
||||
if (editor.inBlockSubMode)
|
||||
throw RuntimeException("Move caret with [vimMoveBlockSelectionToOffset]")
|
||||
if (!editor.inVisualMode && !editor.inSelectMode) error("Attempt to extent selection in non-visual mode")
|
||||
if (editor.inBlockSubMode) error("Move caret with [vimMoveBlockSelectionToOffset]")
|
||||
|
||||
val startOffsetMark = vimSelectionStart
|
||||
|
||||
|
@@ -267,8 +267,7 @@ class VisualMotionGroup {
|
||||
|
||||
private fun blockModeStartAndEnd(editor: Editor): Pair<Int, Int> {
|
||||
val selections = editor.caretModel.allCarets.map { it.selectionStart to it.selectionEnd }.sortedBy { it.first }
|
||||
val maxColumn = selections.map { editor.offsetToLogicalPosition(it.second).column }.max()
|
||||
?: throw RuntimeException("No carets")
|
||||
val maxColumn = selections.map { editor.offsetToLogicalPosition(it.second).column }.max() ?: error("No carets")
|
||||
val lastLine = editor.offsetToLogicalPosition(selections.last().first).line
|
||||
return selections.first().first to editor.logicalPositionToOffset(LogicalPosition(lastLine, maxColumn))
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ class ActionBeanClass : AbstractExtensionPointBean() {
|
||||
'O' -> res += MappingMode.OP_PENDING
|
||||
'I' -> res += MappingMode.INSERT
|
||||
'C' -> res += MappingMode.CMD_LINE
|
||||
else -> throw RuntimeException("Wrong mapping mode: $c")
|
||||
else -> error("Wrong mapping mode: $c")
|
||||
}
|
||||
}
|
||||
return res.toSet()
|
||||
|
@@ -25,11 +25,13 @@ import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.action.motion.updown.*
|
||||
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.helper.*
|
||||
import com.maddyhome.idea.vim.helper.StringHelper
|
||||
import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
||||
import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||
import java.util.*
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
@@ -77,18 +79,18 @@ abstract class EditorActionHandlerBase(private val myRunForEachCaret: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun doExecute(_editor: Editor, caret: Caret, context: DataContext) {
|
||||
private fun doExecute(editor: Editor, caret: Caret, context: DataContext) {
|
||||
if (!VimPlugin.isEnabled()) return
|
||||
|
||||
val editor = _editor.getTopLevelEditor()
|
||||
val topLevelEditor = editor.getTopLevelEditor()
|
||||
logger.debug("Execute command with handler: " + this.javaClass.name)
|
||||
|
||||
val cmd = editor.commandState.executingCommand ?: run {
|
||||
val cmd = topLevelEditor.commandState.executingCommand ?: run {
|
||||
VimPlugin.indicateError()
|
||||
return
|
||||
}
|
||||
|
||||
if (!baseExecute(editor, caret, CaretSpecificDataContext(context, caret), cmd)) VimPlugin.indicateError()
|
||||
if (!baseExecute(topLevelEditor, caret, CaretSpecificDataContext(context, caret), cmd)) VimPlugin.indicateError()
|
||||
}
|
||||
|
||||
open fun process(cmd: Command) {
|
||||
|
@@ -24,13 +24,17 @@ import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.event.CaretEvent
|
||||
import com.intellij.openapi.editor.event.CaretListener
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.action.motion.updown.*
|
||||
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.MotionType
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.inBlockSubMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
|
||||
/**
|
||||
* @author Alex Plate
|
||||
@@ -191,10 +195,11 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
val caretToDelete = event.caret ?: return
|
||||
if (editor.inVisualMode) {
|
||||
for (caret in editor.caretModel.allCarets) {
|
||||
if (caretToDelete.selectionStart < caret.selectionEnd &&
|
||||
caretToDelete.selectionStart >= caret.selectionStart ||
|
||||
caretToDelete.selectionEnd <= caret.selectionEnd &&
|
||||
caretToDelete.selectionEnd > caret.selectionStart) {
|
||||
val curCaretStart = caret.selectionStart
|
||||
val curCaretEnd = caret.selectionEnd
|
||||
val caretStartBetweenCur = caretToDelete.selectionStart in curCaretStart until curCaretEnd
|
||||
val caretEndBetweenCur = caretToDelete.selectionEnd in curCaretStart + 1..curCaretEnd
|
||||
if (caretStartBetweenCur || caretEndBetweenCur) {
|
||||
// Okay, caret is being removed because of merging
|
||||
val vimSelectionStart = caretToDelete.vimSelectionStart
|
||||
caret.vimSelectionStart = vimSelectionStart
|
||||
|
@@ -76,11 +76,12 @@ abstract class ShiftedArrowKeyHandler : VimActionHandler.SingleExecution() {
|
||||
final override fun execute(editor: Editor, context: DataContext, cmd: Command): Boolean {
|
||||
val keymodelOption = OptionsManager.keymodel
|
||||
val startSel = KeyModelOptionData.startsel in keymodelOption
|
||||
val continueselect = KeyModelOptionData.continueselect in keymodelOption
|
||||
val continuevisual = KeyModelOptionData.continuevisual in keymodelOption
|
||||
val inVisualMode = editor.inVisualMode
|
||||
val inSelectMode = editor.inSelectMode
|
||||
if (startSel || continueselect && inSelectMode || continuevisual && inVisualMode) {
|
||||
|
||||
val continueSelectSelection = KeyModelOptionData.continueselect in keymodelOption && inSelectMode
|
||||
val continueVisualSelection = KeyModelOptionData.continuevisual in keymodelOption && inVisualMode
|
||||
if (startSel || continueSelectSelection || continueVisualSelection) {
|
||||
if (!inVisualMode && !inSelectMode) {
|
||||
if (SelectModeOptionData.key in OptionsManager.selectmode) {
|
||||
VimPlugin.getVisualMotion().enterSelectMode(editor, CommandState.SubMode.VISUAL_CHARACTER)
|
||||
|
@@ -21,21 +21,19 @@
|
||||
package com.maddyhome.idea.vim.helper
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.action.motion.updown.*
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandState
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
|
||||
val usesVirtualSpace
|
||||
get() = OptionsManager.virtualedit.value == "onemore"
|
||||
|
||||
val CommandState.Mode.isEndAllowed : Boolean
|
||||
val CommandState.Mode.isEndAllowed: Boolean
|
||||
get() = when (this) {
|
||||
CommandState.Mode.INSERT, CommandState.Mode.VISUAL, CommandState.Mode.SELECT -> true
|
||||
CommandState.Mode.COMMAND, CommandState.Mode.CMD_LINE, CommandState.Mode.REPLACE, CommandState.Mode.OP_PENDING -> usesVirtualSpace
|
||||
}
|
||||
|
||||
val CommandState.Mode.isEndAllowedIgnoringOnemore : Boolean
|
||||
val CommandState.Mode.isEndAllowedIgnoringOnemore: Boolean
|
||||
get() = when (this) {
|
||||
CommandState.Mode.INSERT, CommandState.Mode.VISUAL, CommandState.Mode.SELECT -> true
|
||||
CommandState.Mode.COMMAND, CommandState.Mode.CMD_LINE, CommandState.Mode.REPLACE, CommandState.Mode.OP_PENDING -> false
|
||||
|
@@ -15,40 +15,24 @@
|
||||
* 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.helper
|
||||
|
||||
package com.maddyhome.idea.vim.helper;
|
||||
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class EditorDataContext implements DataContext {
|
||||
public EditorDataContext(Editor editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
||||
import com.intellij.openapi.editor.Editor
|
||||
|
||||
class EditorDataContext(private val editor: Editor, private val contextDelegate: DataContext? = null) : DataContext {
|
||||
/**
|
||||
* Returns the object corresponding to the specified data identifier. Some of the supported data identifiers are
|
||||
* defined in the {@link PlatformDataKeys} class.
|
||||
* defined in the [PlatformDataKeys] class.
|
||||
*
|
||||
* @param dataId the data identifier for which the value is requested.
|
||||
* @return the value, or null if no value is available in the current context for this identifier.
|
||||
*/
|
||||
@Override
|
||||
public Object getData(@NotNull String dataId) {
|
||||
if (PlatformDataKeys.EDITOR.getName().equals(dataId)) {
|
||||
return editor;
|
||||
override fun getData(dataId: String): Any? = when {
|
||||
PlatformDataKeys.EDITOR.name == dataId -> editor
|
||||
PlatformDataKeys.PROJECT.name == dataId -> editor.project
|
||||
PlatformDataKeys.VIRTUAL_FILE.name == dataId -> EditorHelper.getVirtualFile(editor)
|
||||
else -> contextDelegate?.getData(dataId)
|
||||
}
|
||||
else if (PlatformDataKeys.PROJECT.getName().equals(dataId)) {
|
||||
return editor.getProject();
|
||||
}
|
||||
else if (PlatformDataKeys.VIRTUAL_FILE.getName().equals(dataId)) {
|
||||
return EditorHelper.getVirtualFile(editor);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private final Editor editor;
|
||||
}
|
@@ -736,7 +736,7 @@ public class EditorHelper {
|
||||
// a visual position). If it is an inlay and is related to preceding text, we want to display it, so use it as the
|
||||
// target column. If it's an inlay related to following text, we don't want to display it at the right of the
|
||||
// screen, show the previous column
|
||||
var inlay = editor.getInlayModel().getInlineElementAt(new VisualPosition(visualLine, visualColumn));
|
||||
Inlay inlay = editor.getInlayModel().getInlineElementAt(new VisualPosition(visualLine, visualColumn));
|
||||
if (inlay != null && !inlay.isRelatedToPrecedingText()) {
|
||||
targetVisualColumn = visualColumn - 1;
|
||||
}
|
||||
|
@@ -20,13 +20,15 @@
|
||||
|
||||
package com.maddyhome.idea.vim.helper
|
||||
|
||||
import com.intellij.ide.scratch.ScratchFileService
|
||||
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.maddyhome.idea.vim.option.OptionsManager
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
val Editor.fileSize: Int
|
||||
get() = document.textLength
|
||||
@@ -36,13 +38,21 @@ val Editor.fileSize: Int
|
||||
* So, we should enable IdeaVim for such editors and disable it on the first interaction
|
||||
*/
|
||||
val Editor.isIdeaVimDisabledHere: Boolean
|
||||
get() = (isOneLineMode || disabledForThisEditor) && !OptionsManager.oneline.isSet
|
||||
|
||||
val Editor.disabledForThisEditor: Boolean
|
||||
get() = isDatabaseCell || disabledInDialog
|
||||
get() {
|
||||
var res = true
|
||||
val timeForCalculation = measureTimeMillis {
|
||||
res = (disabledInDialog
|
||||
|| isDatabaseCell && !OptionsManager.oneline.isSet
|
||||
|| isOneLineMode && !OptionsManager.oneline.isSet)
|
||||
}
|
||||
if (timeForCalculation > 10) {
|
||||
logger<Editor>().error("Time for calculation of 'isIdeaVimDisabledHere' took $timeForCalculation ms.")
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
private val Editor.isDatabaseCell: Boolean
|
||||
get() = ScratchFileService.findRootType(EditorHelper.getVirtualFile(this))?.id == "consoles/.datagrid"
|
||||
get() = DarculaUIUtil.isTableCellEditor(this.component)
|
||||
|
||||
private val Editor.disabledInDialog: Boolean
|
||||
get() = OptionsManager.dialogescape.value == "off" && (!this.isPrimaryEditor() && !EditorHelper.isFileEditor(this))
|
||||
@@ -64,6 +74,6 @@ val Caret.amountOfInlaysBeforeCaret: Int
|
||||
|
||||
fun Editor.amountOfInlaysBeforeVisualPosition(pos: VisualPosition): Int {
|
||||
val newOffset = EditorHelper.visualPositionToOffset(this, pos)
|
||||
val lineStartNewOffset: Int = this.getDocument().getLineStartOffset(this.visualToLogicalPosition(pos).line)
|
||||
return this.getInlayModel().getInlineElementsInRange(lineStartNewOffset, newOffset).size
|
||||
val lineStartNewOffset: Int = this.document.getLineStartOffset(this.visualToLogicalPosition(pos).line)
|
||||
return this.inlayModel.getInlineElementsInRange(lineStartNewOffset, newOffset).size
|
||||
}
|
@@ -19,7 +19,10 @@
|
||||
package com.maddyhome.idea.vim.helper
|
||||
|
||||
import com.intellij.injected.editor.EditorWindow
|
||||
import com.intellij.openapi.editor.*
|
||||
import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.LogicalPosition
|
||||
import com.intellij.openapi.editor.VisualPosition
|
||||
|
||||
/**
|
||||
* Move the caret to the given offset, handling inline inlays
|
||||
@@ -42,8 +45,7 @@ fun Caret.moveToInlayAwareOffset(offset: Int) {
|
||||
// If the target offset is collapsed inside a fold, move directly to the offset, expanding the fold
|
||||
if (editor.foldingModel.isOffsetCollapsed(offset)) {
|
||||
moveToOffset(offset)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
val newVisualPosition = inlayAwareOffsetToVisualPosition(editor, offset)
|
||||
if (newVisualPosition != visualPosition) {
|
||||
moveToVisualPosition(newVisualPosition)
|
||||
@@ -62,8 +64,7 @@ private fun inlayAwareOffsetToVisualPosition(editor: Editor, offset: Int): Visua
|
||||
val e = if (editor is EditorWindow) {
|
||||
logicalPosition = editor.injectedToHost(logicalPosition)
|
||||
editor.delegate
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
editor
|
||||
}
|
||||
var pos = e.logicalToVisualPosition(logicalPosition)
|
||||
|
@@ -44,6 +44,7 @@ public class StringHelper {
|
||||
* Fake key for <Plug> mappings
|
||||
*/
|
||||
private static final int VK_PLUG = KeyEvent.CHAR_UNDEFINED - 1;
|
||||
public static final int VK_ACTION = KeyEvent.CHAR_UNDEFINED - 2;
|
||||
|
||||
private StringHelper() {}
|
||||
|
||||
@@ -468,6 +469,8 @@ public class StringHelper {
|
||||
return VK_F12;
|
||||
case "plug":
|
||||
return VK_PLUG;
|
||||
case "action":
|
||||
return VK_ACTION;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -529,6 +532,8 @@ public class StringHelper {
|
||||
return "f12";
|
||||
case VK_PLUG:
|
||||
return "plug";
|
||||
case VK_ACTION:
|
||||
return "action";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ package com.maddyhome.idea.vim.key;
|
||||
import com.google.common.collect.HashMultiset;
|
||||
import com.google.common.collect.Multiset;
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler;
|
||||
import com.maddyhome.idea.vim.helper.StringHelper;
|
||||
import kotlin.Pair;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -56,7 +57,25 @@ public class KeyMapping implements Iterable<List<KeyStroke>> {
|
||||
// Having a parameter of Iterable allows for a nicer API, because we know when a given list is immutable.
|
||||
// TODO: Should we change this to be a trie?
|
||||
assert (keys instanceof List) : "keys must be of type List<KeyStroke>";
|
||||
return myKeys.get(keys);
|
||||
|
||||
List<KeyStroke> keyStrokes = (List<KeyStroke>)keys;
|
||||
|
||||
MappingInfo mappingInfo = myKeys.get(keys);
|
||||
if (mappingInfo != null) return mappingInfo;
|
||||
|
||||
if (keyStrokes.size() > 3) {
|
||||
if (keyStrokes.get(0).getKeyCode() == StringHelper.VK_ACTION &&
|
||||
keyStrokes.get(1).getKeyChar() == '(' &&
|
||||
keyStrokes.get(keyStrokes.size() - 1).getKeyChar() == ')') {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 2; i < keyStrokes.size() - 1; i++) {
|
||||
builder.append(keyStrokes.get(i).getKeyChar());
|
||||
}
|
||||
return new ToActionMappingInfo(builder.toString(), keyStrokes, false, MappingOwner.IdeaVim.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void put(@NotNull List<KeyStroke> fromKeys,
|
||||
@@ -108,6 +127,14 @@ public class KeyMapping implements Iterable<List<KeyStroke>> {
|
||||
// Having a parameter of Iterable allows for a nicer API, because we know when a given list is immutable.
|
||||
// Perhaps we should look at changing this to a trie or something?
|
||||
assert (keys instanceof List) : "keys must be of type List<KeyStroke>";
|
||||
return myPrefixes.contains(keys);
|
||||
|
||||
List<KeyStroke> keyList = (List<KeyStroke>)keys;
|
||||
if (keyList.isEmpty()) return false;
|
||||
|
||||
if (myPrefixes.contains(keys)) return true;
|
||||
|
||||
int firstChar = keyList.get(0).getKeyCode();
|
||||
char lastChar = keyList.get(keyList.size() - 1).getKeyChar();
|
||||
return firstChar == StringHelper.VK_ACTION && lastChar != ')';
|
||||
}
|
||||
}
|
||||
|
@@ -17,8 +17,30 @@
|
||||
*/
|
||||
package com.maddyhome.idea.vim.key
|
||||
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.command.CommandProcessor
|
||||
import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext
|
||||
import com.maddyhome.idea.vim.KeyHandler
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.argumentCaptured
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.clean
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.lastExtensionHandler
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.repeatHandler
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.CommandState
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.command.SelectionType.Companion.fromSubMode
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection.Companion.create
|
||||
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.toKeyNotation
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
import com.maddyhome.idea.vim.listener.SelectionVimListenerSuppressor
|
||||
import java.awt.event.KeyEvent
|
||||
import java.util.*
|
||||
import javax.swing.KeyStroke
|
||||
import kotlin.math.min
|
||||
|
||||
@@ -26,6 +48,11 @@ import kotlin.math.min
|
||||
* @author vlan
|
||||
*/
|
||||
sealed class MappingInfo(val fromKeys: List<KeyStroke>, val isRecursive: Boolean, val owner: MappingOwner) : Comparable<MappingInfo> {
|
||||
|
||||
abstract fun getPresentableString(): String
|
||||
|
||||
abstract fun execute(editor: Editor, context: DataContext)
|
||||
|
||||
override fun compareTo(other: MappingInfo): Int {
|
||||
val size = fromKeys.size
|
||||
val otherSize = other.fromKeys.size
|
||||
@@ -57,11 +84,101 @@ class ToKeysMappingInfo(
|
||||
fromKeys: List<KeyStroke>,
|
||||
isRecursive: Boolean,
|
||||
owner: MappingOwner
|
||||
) : MappingInfo(fromKeys, isRecursive, owner)
|
||||
) : MappingInfo(fromKeys, isRecursive, owner) {
|
||||
override fun getPresentableString(): String = toKeyNotation(toKeys)
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
val editorDataContext = EditorDataContext(editor, context)
|
||||
val fromIsPrefix = KeyHandler.isPrefix(fromKeys, toKeys)
|
||||
var first = true
|
||||
for (keyStroke in toKeys) {
|
||||
val recursive = isRecursive && !(first && fromIsPrefix)
|
||||
val keyHandler = KeyHandler.getInstance()
|
||||
keyHandler.handleKey(editor, keyStroke, editorDataContext, recursive)
|
||||
first = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ToHandlerMappingInfo(
|
||||
val extensionHandler: VimExtensionHandler,
|
||||
fromKeys: List<KeyStroke>,
|
||||
isRecursive: Boolean,
|
||||
owner: MappingOwner
|
||||
) : MappingInfo(fromKeys, isRecursive, owner)
|
||||
) : MappingInfo(fromKeys, isRecursive, owner) {
|
||||
override fun getPresentableString(): String = "call ${this.javaClass.canonicalName}"
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
val processor = CommandProcessor.getInstance()
|
||||
val commandState = CommandState.getInstance(editor)
|
||||
|
||||
// Cache isOperatorPending in case the extension changes the mode while moving the caret
|
||||
// See CommonExtensionTest
|
||||
// TODO: Is this legal? Should we assert in this case?
|
||||
|
||||
// Cache isOperatorPending in case the extension changes the mode while moving the caret
|
||||
// See CommonExtensionTest
|
||||
// TODO: Is this legal? Should we assert in this case?
|
||||
val shouldCalculateOffsets: Boolean = commandState.isOperatorPending
|
||||
|
||||
val startOffsets: Map<Caret, Int> = editor.caretModel.allCarets.associateWith { it.offset }
|
||||
|
||||
if (extensionHandler.isRepeatable) {
|
||||
clean()
|
||||
}
|
||||
|
||||
processor.executeCommand(editor.project, { extensionHandler.execute(editor, context) },
|
||||
"Vim " + extensionHandler.javaClass.simpleName, null)
|
||||
|
||||
if (extensionHandler.isRepeatable) {
|
||||
lastExtensionHandler = extensionHandler
|
||||
argumentCaptured = null
|
||||
repeatHandler = true
|
||||
}
|
||||
|
||||
if (shouldCalculateOffsets && !commandState.commandBuilder.hasCurrentCommandPartArgument()) {
|
||||
val offsets: MutableMap<Caret, VimSelection> = HashMap()
|
||||
for (caret in editor.caretModel.allCarets) {
|
||||
var startOffset = startOffsets[caret]
|
||||
if (caret.hasSelection()) {
|
||||
val vimSelection = create(caret.vimSelectionStart, caret.offset, fromSubMode(editor.subMode), editor)
|
||||
offsets[caret] = vimSelection
|
||||
commandState.popModes()
|
||||
} else if (startOffset != null && startOffset != caret.offset) {
|
||||
// Command line motions are always characterwise exclusive
|
||||
var endOffset = caret.offset
|
||||
if (startOffset < endOffset) {
|
||||
endOffset -= 1
|
||||
} else {
|
||||
startOffset -= 1
|
||||
}
|
||||
val vimSelection = create(startOffset, endOffset, SelectionType.CHARACTER_WISE, editor)
|
||||
offsets[caret] = vimSelection
|
||||
SelectionVimListenerSuppressor.lock().use { ignored ->
|
||||
// Move caret to the initial offset for better undo action
|
||||
// This is not a necessary thing, but without it undo action look less convenient
|
||||
editor.caretModel.moveToOffset(startOffset)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (offsets.isNotEmpty()) {
|
||||
commandState.commandBuilder.completeCommandPart(Argument(offsets))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ToActionMappingInfo(
|
||||
val action: String,
|
||||
fromKeys: List<KeyStroke>,
|
||||
isRecursive: Boolean,
|
||||
owner: MappingOwner
|
||||
) : MappingInfo(fromKeys, isRecursive, owner) {
|
||||
override fun getPresentableString(): String = "action $action"
|
||||
|
||||
override fun execute(editor: Editor, context: DataContext) {
|
||||
val editorDataContext = EditorDataContext(editor, context)
|
||||
val dataContext = CaretSpecificDataContext(editorDataContext, editor.caretModel.currentCaret)
|
||||
KeyHandler.executeAction(action, dataContext)
|
||||
}
|
||||
}
|
||||
|
@@ -154,7 +154,8 @@ object IdeaSpecifics {
|
||||
//region Register shortcuts for lookup and perform partial reset
|
||||
private object LookupListener : PropertyChangeListener {
|
||||
override fun propertyChange(evt: PropertyChangeEvent?) {
|
||||
if (evt != null && evt.propertyName == "activeLookup" && evt.oldValue == null && evt.newValue != null) {
|
||||
if (evt == null) return
|
||||
if (evt.propertyName == "activeLookup" && evt.oldValue == null && evt.newValue != null) {
|
||||
val lookup = evt.newValue
|
||||
if (lookup is LookupImpl) {
|
||||
VimPlugin.getKey().registerShortcutsForLookup(lookup)
|
||||
@@ -190,6 +191,7 @@ object IdeaSpecifics {
|
||||
//endregion
|
||||
}
|
||||
|
||||
//region Find action ID
|
||||
class FindActionIdAction : DumbAwareToggleAction() {
|
||||
override fun isSelected(e: AnActionEvent): Boolean = FindActionId.enabled
|
||||
|
||||
@@ -201,3 +203,4 @@ class FindActionIdAction : DumbAwareToggleAction() {
|
||||
object FindActionId {
|
||||
var enabled = false
|
||||
}
|
||||
//endregion
|
||||
|
@@ -49,8 +49,21 @@ import com.maddyhome.idea.vim.group.EditorGroup
|
||||
import com.maddyhome.idea.vim.group.FileGroup
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.group.SearchGroup
|
||||
import com.maddyhome.idea.vim.group.visual.*
|
||||
import com.maddyhome.idea.vim.helper.*
|
||||
import com.maddyhome.idea.vim.group.visual.IdeaSelectionControl
|
||||
import com.maddyhome.idea.vim.group.visual.VimVisualTimer
|
||||
import com.maddyhome.idea.vim.group.visual.moveCaretOneCharLeftFromSelectionEnd
|
||||
import com.maddyhome.idea.vim.group.visual.vimSetSystemSelectionSilently
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.StatisticReporter
|
||||
import com.maddyhome.idea.vim.helper.exitSelectMode
|
||||
import com.maddyhome.idea.vim.helper.exitVisualMode
|
||||
import com.maddyhome.idea.vim.helper.inSelectMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import com.maddyhome.idea.vim.helper.isIdeaVimDisabledHere
|
||||
import com.maddyhome.idea.vim.helper.moveToInlayAwareOffset
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.listener.VimListenerManager.EditorListeners.add
|
||||
import com.maddyhome.idea.vim.listener.VimListenerManager.EditorListeners.remove
|
||||
import com.maddyhome.idea.vim.option.OptionsManager
|
||||
@@ -139,8 +152,6 @@ object VimListenerManager {
|
||||
|
||||
fun add(editor: Editor) {
|
||||
|
||||
if (editor.disabledForThisEditor) return
|
||||
|
||||
editor.contentComponent.addKeyListener(VimKeyListener)
|
||||
val eventFacade = EventFacade.getInstance()
|
||||
eventFacade.addEditorMouseListener(editor, EditorMouseHandler)
|
||||
@@ -155,8 +166,6 @@ object VimListenerManager {
|
||||
|
||||
fun remove(editor: Editor, isReleased: Boolean) {
|
||||
|
||||
if (editor.disabledForThisEditor) return
|
||||
|
||||
editor.contentComponent.removeKeyListener(VimKeyListener)
|
||||
val eventFacade = EventFacade.getInstance()
|
||||
eventFacade.removeEditorMouseListener(editor, EditorMouseHandler)
|
@@ -302,7 +302,7 @@ public class ExOutputPanel extends JPanel {
|
||||
final KeyStroke key = KeyStroke.getKeyStrokeForEvent(e);
|
||||
final List<KeyStroke> keys = new ArrayList<>(1);
|
||||
keys.add(key);
|
||||
VimPlugin.getMacro().playbackKeys(myEditor, new EditorDataContext(myEditor), project, keys, 0, 0, 1);
|
||||
VimPlugin.getMacro().playbackKeys(myEditor, new EditorDataContext(myEditor, null), project, keys, 0, 0, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -65,7 +65,9 @@ class ShowCmdStatusBarWidgetFactory : StatusBarWidgetFactory, LightEditCompatibl
|
||||
|
||||
override fun getDisplayName(): String = ShowCmd.displayName
|
||||
|
||||
override fun disposeWidget(widget: StatusBarWidget) {}
|
||||
override fun disposeWidget(widget: StatusBarWidget) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
override fun isAvailable(project: Project): Boolean = OptionsManager.showcmd.isSet
|
||||
|
||||
|
@@ -58,7 +58,9 @@ class StatusBarIconFactory : StatusBarWidgetFactory, LightEditCompatible {
|
||||
|
||||
override fun getDisplayName(): String = STATUS_BAR_DISPLAY_NAME
|
||||
|
||||
override fun disposeWidget(widget: StatusBarWidget) {}
|
||||
override fun disposeWidget(widget: StatusBarWidget) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
override fun isAvailable(project: Project): Boolean {
|
||||
@Suppress("DEPRECATION")
|
||||
@@ -103,9 +105,13 @@ class VimStatusBar : StatusBarWidget, StatusBarWidget.IconPresentation {
|
||||
|
||||
override fun ID(): String = STATUS_BAR_ICON_ID
|
||||
|
||||
override fun install(statusBar: StatusBar) {}
|
||||
override fun install(statusBar: StatusBar) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
override fun dispose() {}
|
||||
override fun dispose() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
override fun getTooltipText() = STATUS_BAR_DISPLAY_NAME
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Manual Tests
|
||||
|
||||
## #1 [Last run: 2020-08-25]
|
||||
## #1 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -14,7 +14,7 @@ Word is selected, block-caret is placed on the word end (offset = `word end - 1`
|
||||

|
||||
|
||||
|
||||
## #2 [Last run: 2020-08-25]
|
||||
## #2 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -26,7 +26,7 @@ Last word is selected, block caret is placed on the word end without bouncing
|
||||
|
||||

|
||||
|
||||
## #3 [Last run: 2020-08-25]
|
||||
## #3 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -38,7 +38,7 @@ Line is selected. Caret is placed on the line end
|
||||
|
||||

|
||||
|
||||
## #4 [Last run: 2020-08-25]
|
||||
## #4 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -51,7 +51,7 @@ After mouse release, caret moves one character back and becomes block shape
|
||||
|
||||

|
||||
|
||||
## #5 [Last run: 2020-08-25]
|
||||
## #5 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -65,7 +65,7 @@ After mouse release, caret moves one character back and becomes block shape
|
||||
|
||||

|
||||
|
||||
## #6 [Last run: 2020-08-25]
|
||||
## #6 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -77,7 +77,7 @@ Line is selected, caret is on the first position
|
||||
|
||||

|
||||
|
||||
## #6 [Last run: 2020-08-25]
|
||||
## #6 [Last run: 2020-10-09]
|
||||
|
||||
_Initial mode:_ NORMAL
|
||||
|
||||
@@ -94,7 +94,7 @@ Caret stays in _block_ shape with a normal mode
|
||||

|
||||
|
||||
|
||||
## #7 [Last run: 2020-08-25]
|
||||
## #7 [Last run: 2020-10-09]
|
||||
|
||||
_Action:_
|
||||
Turn emulation off and on
|
||||
@@ -102,7 +102,7 @@ Turn emulation off and on
|
||||
_Result:_
|
||||
Vim emulator works as expected
|
||||
|
||||
## #8 [Last run: 2020-08-25
|
||||
## #8 [Last run: 2020-10-09
|
||||
|
||||
_Action:_
|
||||
Start up IJ with disabled emulator, turn it on
|
||||
@@ -110,7 +110,7 @@ Start up IJ with disabled emulator, turn it on
|
||||
_Result:_
|
||||
Vim emulator works as expected
|
||||
|
||||
## #9 [Last run: 2020-08-25]
|
||||
## #9 [Last run: 2020-10-09]
|
||||
|
||||
_Action:_
|
||||
Wrap with if
|
||||
|
@@ -89,7 +89,7 @@ public abstract class JavaVimTestCase extends JavaCodeInsightFixtureTestCase {
|
||||
protected Editor typeText(@NotNull List<KeyStroke> keys) {
|
||||
final Editor editor = myFixture.getEditor();
|
||||
final KeyHandler keyHandler = KeyHandler.getInstance();
|
||||
final EditorDataContext dataContext = new EditorDataContext(editor);
|
||||
final EditorDataContext dataContext = new EditorDataContext(editor, null);
|
||||
final Project project = myFixture.getProject();
|
||||
TestInputModel.getInstance(editor).setKeyStrokes(keys);
|
||||
RunnableHelper.runWriteCommand(project, () -> {
|
||||
|
@@ -441,4 +441,89 @@ n ,f <Plug>Foo
|
||||
typeText(StringHelper.parseKeys("iD<Esc>"))
|
||||
myFixture.checkResult("A quick brown ${c}Dfox jumps over the lazy dog. A quick brown fox jumps over the lazy dog")
|
||||
}
|
||||
|
||||
fun `test comment line with action`() {
|
||||
configureByJavaText("""
|
||||
-----
|
||||
1<caret>2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
typeText(commandToKeys("map k <Action>(CommentByLineComment)"))
|
||||
typeText(StringHelper.parseKeys("k"))
|
||||
myFixture.checkResult("""
|
||||
-----
|
||||
//12345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test execute two actions with two mappings`() {
|
||||
configureByJavaText("""
|
||||
-----
|
||||
1<caret>2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
typeText(commandToKeys("map k <Action>(CommentByLineComment)"))
|
||||
typeText(StringHelper.parseKeys("kk"))
|
||||
myFixture.checkResult("""
|
||||
-----
|
||||
//12345
|
||||
//abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test execute two actions with single mappings`() {
|
||||
configureByJavaText("""
|
||||
-----
|
||||
1<caret>2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
typeText(commandToKeys("map k <Action>(CommentByLineComment)<Action>(CommentByLineComment)"))
|
||||
typeText(StringHelper.parseKeys("k"))
|
||||
myFixture.checkResult("""
|
||||
-----
|
||||
//12345
|
||||
//abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test execute three actions with single mappings`() {
|
||||
configureByJavaText("""
|
||||
-----
|
||||
1<caret>2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
typeText(commandToKeys("map k <Action>(CommentByLineComment)<Action>(CommentByLineComment)<Action>(CommentByLineComment)"))
|
||||
typeText(StringHelper.parseKeys("k"))
|
||||
myFixture.checkResult("""
|
||||
-----
|
||||
//12345
|
||||
//abcde
|
||||
//-----
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test execute action from insert mode`() {
|
||||
configureByJavaText("""
|
||||
-----
|
||||
1<caret>2345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
typeText(commandToKeys("imap k <Action>(CommentByLineComment)"))
|
||||
typeText(StringHelper.parseKeys("ik"))
|
||||
myFixture.checkResult("""
|
||||
-----
|
||||
//12345
|
||||
abcde
|
||||
-----
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
@@ -18,9 +18,6 @@
|
||||
|
||||
package org.jetbrains.plugins.ideavim.propertybased
|
||||
|
||||
import org.intellij.lang.annotations.Language
|
||||
|
||||
@Language("JAVA")
|
||||
internal val javaText = """
|
||||
/*
|
||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||
|
Reference in New Issue
Block a user