Skip to content

Commit

Permalink
Merge branch 'master' into VIM-2308
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenmatt committed May 14, 2021
2 parents 7300d25 + 8ca865e commit 0bde71d
Show file tree
Hide file tree
Showing 245 changed files with 550 additions and 487 deletions.
19 changes: 9 additions & 10 deletions .detekt/baseline.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" ?>
<?xml version='1.0' encoding='UTF-8'?>
<SmellBaseline>
<ManuallySuppressedIssues>
<ID>ComplexMethod:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
<ID>ComplexMethod:CommandState.kt$CommandState$ fun toVimNotation(): String</ID>
</ManuallySuppressedIssues>
<CurrentIssues>
<ID>ComplexCondition:CommandParser.kt$CommandParser$Character.isLetter(ch) || command.isEmpty() &amp;&amp; "~&lt;&gt;@=#*&amp;!".indexOf(ch) &gt;= 0 || command.isNotEmpty() &amp;&amp; ch == command[command.length - 1] &amp;&amp; "&lt;&gt;".indexOf(ch) &gt;= 0</ID>
<ID>ComplexCondition:CommandParser.kt$CommandParser$Character.isLetter(ch) || command.isEmpty() &amp;&amp; "~&lt;&gt;@=#*&amp;!".indexOf(ch) >= 0 || command.isNotEmpty() &amp;&amp; ch == command[command.length - 1] &amp;&amp; "&lt;&gt;".indexOf(ch) >= 0</ID>
<ID>ComplexMethod:CommandParser.kt$CommandParser$ @kotlin.jvm.Throws(ExException::class) fun parse(cmd: String): ExCommand</ID>
<ID>ComplexMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
<ID>ComplexMethod:NerdTree.kt$NerdTree$private fun registerCommands()</ID>
<ID>ComplexMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map&lt;String, Any&gt; ): List&lt;Int&gt;</ID>
<ID>ComplexMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map&lt;String, Any>, ): List&lt;Int></ID>
<ID>ComplexMethod:SearchHelperKt.kt$// bounds are considered inside corresponding quotes fun checkInString(chars: CharSequence, currentPos: Int, str: Boolean): Boolean</ID>
<ID>ComplexMethod:SearchHighlightsHelper.kt$ private fun updateSearchHighlights( pattern: String?, shouldIgnoreSmartCase: Boolean, showHighlights: Boolean, initialOffset: Int, searchRange: LineRange?, forwards: Boolean, forceUpdate: Boolean ): Int</ID>
<ID>ComplexMethod:SearchHighlightsHelper.kt$ private fun updateSearchHighlights( pattern: String?, shouldIgnoreSmartCase: Boolean, showHighlights: Boolean, initialOffset: Int, searchRange: LineRange?, forwards: Boolean, forceUpdate: Boolean, ): Int</ID>
<ID>ComplexMethod:TabCloseHandler.kt$TabCloseHandler$ private fun getTabIndexToClose(arg: String, current: Int, last: Int): Int?</ID>
<ID>ComplexMethod:VimExchangeExtension.kt$VimExchangeExtension.Operator$private fun compareExchanges(x: Exchange, y: Exchange): ExchangeCompareResult</ID>
<ID>ComplexMethod:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
Expand All @@ -21,9 +21,8 @@
<ID>LongMethod:HistoryHandler.kt$HistoryHandler$override fun execute(editor: Editor, context: DataContext, cmd: ExCommand): Boolean</ID>
<ID>LongMethod:NerdTree.kt$NerdTree$private fun registerCommands()</ID>
<ID>LongMethod:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
<ID>LongMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map&lt;String, Any&gt; ): List&lt;Int&gt;</ID>
<ID>LongMethod:PutGroup.kt$PutGroup$private fun prepareDocumentAndGetStartOffsets( editor: Editor, caret: Caret, typeInRegister: SelectionType, data: PutData, additionalData: Map&lt;String, Any>, ): List&lt;Int></ID>
<ID>LoopWithTooManyJumpStatements:NerdTree.kt$NerdTree$while (true) { row++ val nextPath = tree.getPathForRow(row) ?: break val pathCount = nextPath.pathCount if (pathCount == currentPathCount) expectedRow = row if (pathCount &lt; currentPathCount) break }</ID>
<ID>LoopWithTooManyJumpStatements:SearchHighlightsHelper.kt$for (project in projectManager.openProjects) { val current = FileEditorManager.getInstance(project).selectedTextEditor ?: continue // [VERSION UPDATE] 202+ Use editors val editors = localEditors(current.document, project) ?: continue for (editor in editors) { // Try to keep existing highlights if possible. Update if hlsearch has changed or if the pattern has changed. // Force update for the situations where the text is the same, but the ignore case values have changed. // E.g. Use `*` to search for a word (which ignores smartcase), then use `/&lt;Up&gt;` to search for the same pattern, // which will match smartcase. Or changing the smartcase/ignorecase settings if (shouldRemoveSearchHighlights(editor, pattern, showHighlights) || forceUpdate) { removeSearchHighlights(editor) } if (pattern == null) continue if (shouldAddAllSearchHighlights(editor, pattern, showHighlights)) { // hlsearch (+ incsearch/noincsearch) val startLine = searchRange?.startLine ?: 0 val endLine = searchRange?.endLine ?: -1 val results = SearchHelper.findAll(editor, pattern, startLine, endLine, shouldIgnoreCase(pattern, shouldIgnoreSmartCase)) if (results.isNotEmpty()) { currentMatchOffset = findClosestMatch(editor, results, initialOffset, forwards) highlightSearchResults(editor, pattern, results, currentMatchOffset) } editor.vimLastSearch = pattern } else if (shouldAddCurrentMatchSearchHighlight(pattern, showHighlights, initialOffset)) { // nohlsearch + incsearch val searchOptions = EnumSet.of(SearchOptions.WHOLE_FILE) if (wrapscan.isSet) searchOptions.add(SearchOptions.WRAP) if (shouldIgnoreSmartCase) searchOptions.add(SearchOptions.IGNORE_SMARTCASE) if (!forwards) searchOptions.add(SearchOptions.BACKWARDS) val result = SearchHelper.findPattern(editor, pattern, initialOffset, 1, searchOptions) if (result != null) { currentMatchOffset = result.startOffset val results = listOf(result) highlightSearchResults(editor, pattern, results, currentMatchOffset) } } else if (shouldMaintainCurrentMatchOffset(pattern, initialOffset)) { // incsearch. If nothing has changed (e.g. we've edited offset values in `/foo/e+2`) make sure we return the // current match offset so the caret remains at the current incsarch match val offset = editor.vimIncsearchCurrentMatchOffset if (offset != null) { currentMatchOffset = offset } } } }</ID>
<ID>MagicNumber:ActionListHandler.kt$ActionListHandler$50</ID>
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$0.9f</ID>
<ID>MagicNumber:AddBlockInlaysAction.kt$AddBlockInlaysAction$1.75f</ID>
Expand Down Expand Up @@ -72,13 +71,13 @@
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$3</ID>
<ID>MagicNumber:VimHighlightedYank.kt$VimHighlightedYank.HighlightHandler$4</ID>
<ID>MatchingDeclarationName:CommandDefinition.kt$CommandName</ID>
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger&lt;ExBeanClass&gt;().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: ${this.pluginDescriptor.pluginId}")</ID>
<ID>MaxLineLength:ExBeanClass.kt$ExBeanClass$logger&lt;ExBeanClass>().error("IdeaVim doesn't accept contributions to `vimActions` extension points. Please create a plugin using `VimExtension`. Plugin to blame: ${this.pluginDescriptor.pluginId}")</ID>
<ID>MaxLineLength:OptionsManager.kt$OptionsManager$val clipboard = addOption(ListOption(ClipboardOptionsData.name, ClipboardOptionsData.abbr, arrayOf(ClipboardOptionsData.ideaput, "autoselect,exclude:cons\\|linux"), null))</ID>
<ID>MaxLineLength:StatisticReporter.kt$StatisticReporter$val url = "https://plugins.jetbrains.com/plugins/list?pluginId=${VimPlugin.getPluginId().idString}&amp;build=$buildNumber&amp;pluginVersion=$version&amp;os=$os&amp;uuid=$uid"</ID>
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList&lt;Range&gt; = mutableListOf()</ID>
<ID>MemberNameEqualsClassName:Ranges.kt$Ranges$private val ranges: MutableList&lt;Range> = mutableListOf()</ID>
<ID>NestedBlockDepth:OptionsManager.kt$OptionsManager$ fun parseOptionLine(editor: Editor?, args: String, failOnBad: Boolean): Boolean</ID>
<ID>ReturnCount:CmdHandler.kt$CmdHandler$private fun addAlias(cmd: ExCommand, editor: Editor?): Boolean</ID>
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array&lt;Range&gt;?</ID>
<ID>ReturnCount:ExRanges.kt$Range.Companion$ @JvmStatic fun createRange(str: String, offset: Int, move: Boolean): Array&lt;Range>?</ID>
<ID>ReturnCount:VimMultipleCursorsExtension.kt$VimMultipleCursorsExtension.NextOccurrenceHandler$override fun executeInWriteAction(editor: Editor, context: DataContext)</ID>
<ID>ReturnCount:VimShortcutKeyAction.kt$VimShortcutKeyAction$private fun isEnabled(e: AnActionEvent): Boolean</ID>
<ID>ReturnCount:VisualMotionGroup.kt$VisualMotionGroup$private fun seemsLikeBlockMode(editor: Editor): Boolean</ID>
Expand All @@ -92,4 +91,4 @@
<ID>TooManyFunctions:VisualGroup.kt$com.maddyhome.idea.vim.group.visual.VisualGroup.kt</ID>
<ID>TooManyFunctions:VisualMotionGroup.kt$VisualMotionGroup</ID>
</CurrentIssues>
</SmellBaseline>
</SmellBaseline>
11 changes: 2 additions & 9 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .teamcity/_Self/buildTypes/Release.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ object Release : BuildType({
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
label = "Password"
)
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
param("env.ORG_GRADLE_PROJECT_publishChannels", "$DEFAULT,$EAP,$DEV")
Expand Down
1 change: 0 additions & 1 deletion .teamcity/_Self/buildTypes/ReleaseDev.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ object ReleaseDev : BuildType({
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
label = "Password"
)
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
param("env.ORG_GRADLE_PROJECT_publishChannels", DEV)
Expand Down
1 change: 0 additions & 1 deletion .teamcity/_Self/buildTypes/ReleaseEap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ object ReleaseEap : BuildType({
"credentialsJSON:61a36031-4da1-4226-a876-b8148bf32bde",
label = "Password"
)
param("env.ORG_GRADLE_PROJECT_publishUsername", "Aleksei.Plate")
param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
param("env.ORG_GRADLE_PROJECT_publishChannels", EAP)
Expand Down
59 changes: 0 additions & 59 deletions .teamcity/_Self/buildTypes/Release_201.kt

This file was deleted.

4 changes: 0 additions & 4 deletions .teamcity/_Self/subprojects/GitHub.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ package _Self.subprojects

import _Self.buildTypes.GithubLint
import _Self.buildTypes.GithubTests
import _Self.buildTypes.Release
import _Self.buildTypes.ReleaseDev
import _Self.buildTypes.ReleaseEap
import _Self.buildTypes.Release_201
import jetbrains.buildServer.configs.kotlin.v2019_2.Project

object GitHub : Project({
Expand Down
2 changes: 0 additions & 2 deletions .teamcity/_Self/subprojects/Releases.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ package _Self.subprojects
import _Self.buildTypes.Release
import _Self.buildTypes.ReleaseDev
import _Self.buildTypes.ReleaseEap
import _Self.buildTypes.Release_201
import jetbrains.buildServer.configs.kotlin.v2019_2.Project

object Releases : Project({
name = "IdeaVim releases"
description = "Stable and EAP releases for IdeaVim"

buildType(Release)
buildType(Release_201)
buildType(ReleaseEap)
buildType(ReleaseDev)
})
13 changes: 10 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ History of changes in IdeaVim for the IntelliJ platform.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project DOES NOT adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Stable versions use X.Y format.
EAP versions use X.Y.Z format.
Stable versions use X.Y format.
EAP ([Early Access Program](https://jb.gg/ideavim-eap)) versions use X.Y.Z format.


Get an Early Access
Expand All @@ -25,7 +25,12 @@ usual beta standards.
## To Be Released

### Features:
* Support `sethandler` command to configure shortcuts conflicts via `~/.ideavimrc` file. See [docs](https://jb.gg/vim-sethandler).
* Support `vim-paragraph-motion` extension [VIM-2290](https://youtrack.jetbrains.com/issue/VIM-2290) | [vim-paragraph-motion](https://github.com/dbakker/vim-paragraph-motion)
* Add "Reset Handlers" button for "Conflicting Shortcuts" setting table

### Changes:
* Rename "Vim Emulation" in settings to "Vim"

### Fixes:
* [VIM-2230](https://youtrack.jetbrains.com/issue/VIM-2230) Tweak caret position with inline rename options inlay
Expand All @@ -35,8 +40,10 @@ usual beta standards.
* [VIM-2284](https://youtrack.jetbrains.com/issue/VIM-2284) Values are not duplicated in set command
* [VIM-2289](https://youtrack.jetbrains.com/issue/VIM-2289) Fix `<End>` command behaviour
* [VIM-1476](https://youtrack.jetbrains.com/issue/VIM-1476) Last inserted text is stored in `.` register
* [VIM-2295](https://youtrack.jetbrains.com/issue/VIM-2295) Fix `<S-Space>` in insert mode with an existing mappign
* [VIM-2295](https://youtrack.jetbrains.com/issue/VIM-2295) Fix `<S-Space>` in insert mode with an existing mapping
* [VIM-1401](https://youtrack.jetbrains.com/issue/VIM-1401) IdeaVim triggers readonly handler
* [VIM-1856](https://youtrack.jetbrains.com/issue/VIM-1856) Support defining shortcuts in .ideavimrc
* [VIM-1523](https://youtrack.jetbrains.com/issue/VIM-1523) Allow different shortcut handlers in different modes

### Merged PRs:
* [280](https://github.com/JetBrains/ideavim/pull/280) by [Matt Ellis](https://github.com/citizenmatt): Caret position and view scrolling fixes
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![TeamCity Build][teamcity-build-status-svg]][teamcity-build-status]

IdeaVim is an open source project created by 60+ contributors. Would you like to make it even better? That’s wonderful!
IdeaVim is an open source project created by 80+ contributors. Would you like to make it even better? That’s wonderful!

This page is created to help you start contributing. And who knows, maybe in a few days this project will be brighter than ever!

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ See the [detailed instructions](https://www.jetbrains.com/help/idea/managing-plu
- Use the `~/.ideavimrc` file as an analog of `~/.vimrc` ([learn more](#Files)). The XDG standard is supported, as well.

- Shortcut conflicts can be resolved by using:
- On Linux & Windows: `File | Settings | Editor | Vim Emulation` & `File | Settings | Keymap`,
- On macOS: `Preferences | Editor | Vim Emulation` & `Preferences | Keymap`,
- On Linux & Windows: `File | Settings | Editor | Vim` & `File | Settings | Keymap`,
- On macOS: `Preferences | Editor | Vim` & `Preferences | Keymap`,
- Regular Vim mappings in the `~/.ideavimrc` file.

Get Early Access
Expand Down
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ buildscript {
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0")
classpath("com.github.AlexPl292:mark-down-to-slack:1.1.2")
}
}

plugins {
java
kotlin("jvm") version "1.3.71"
kotlin("jvm") version "1.5.0"

id("org.jetbrains.intellij") version "0.7.3"
id("io.gitlab.arturbosch.detekt") version "1.15.0"
Expand All @@ -36,7 +36,6 @@ val downloadIdeaSources: String by project
val instrumentPluginCode: String by project

val publishChannels: String by project
val publishUsername: String by project
val publishToken: String by project

val slackUrl: String by project
Expand All @@ -55,7 +54,7 @@ dependencies {
testImplementation("com.ensarsarajcic.neovim.java:neovim-api:0.2.3")
testImplementation("com.ensarsarajcic.neovim.java:core-rpc:0.2.3")

testImplementation("com.intellij.remoterobot:remote-robot:0.10.3")
testImplementation("com.intellij.remoterobot:remote-robot:0.11.2")
testImplementation("com.intellij.remoterobot:remote-fixtures:1.1.18")
}

Expand All @@ -72,12 +71,14 @@ tasks {
compileKotlin {
kotlinOptions {
jvmTarget = javaVersion
apiVersion = "1.3"
// allWarningsAsErrors = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = javaVersion
apiVersion = "1.3"
// allWarningsAsErrors = true
}
}
Expand Down Expand Up @@ -119,7 +120,6 @@ tasks {

publishPlugin {
channels(publishChannels.split(","))
username(publishUsername)
token(publishToken)
}

Expand Down
2 changes: 1 addition & 1 deletion doc
Submodule doc updated from a821b9 to 317553
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ version=SNAPSHOT
javaVersion=1.8

# Please don't forget to update kotlin version in buildscript section
kotlinVersion=1.3.71
publishUsername=username
kotlinVersion=1.5.0
publishToken=token
publishChannels=eap

Expand Down
Loading

0 comments on commit 0bde71d

Please sign in to comment.