1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-10-09 04:26:57 +02:00
Commit Graph

1772 Commits

Author SHA1 Message Date
Matt Ellis
aef0515183 Replace asDouble with a new toVimFloat function 2025-09-08 09:58:34 +03:00
Matt Ellis
b48f80ee7d Deprecate VimDataType.asString
Prefer `toVimString` to `asString`. It makes it more explicit that the caller requires a Vim String type, and must follow Vim's conversion rules, rather than simple requiring a string. It also prevents confusion with other string functions such as `toString`, `toOutputString`, `toInsertableString`.

The function is deprecated because it's in use by external plugins. There is no change in functionality.
2025-09-08 09:58:34 +03:00
Matt Ellis
fdda1f0eb6 Refactor VimInt.parseNumber 2025-09-08 09:58:34 +03:00
Matt Ellis
69fac0eff0 Deprecate VimDataType.asBoolean
The `asBoolean` method does not make it clear that only a Vim Number can be treated as a boolean and incorrectly allowed a Float to be converted.

If a caller needs a boolean value, it should be explicit that it must get a Number by calling `toVimNumber` and then using the new `booleanValue` accessor. This correctly allows conversion from a String, and other Vim datatypes will correctly raise an error.

The implementation of `VimString.toVimNumber` has been updated to match Vim behaviour, and the behaviour of the previously called `VimString.asDouble` by allowing trailing characters while converting a string to a number.

The `asBoolean` function is deprecated because it is used by external plugins.
2025-09-08 09:58:34 +03:00
Matt Ellis
9dd60cdb3b Introduce VimDataType.toOutputString
It's confusing to know the rules for converting between data types. This change introduces a semantically named method for getting a string representation that can be used in output and error messages.
2025-09-08 09:58:34 +03:00
Alex Plate
f5c1b11e4f [API] Rename Read to EditorAccessor 2025-09-05 16:51:06 +03:00
Xinhe Wang
b304905b35 Simplify KeyStrokeTrie.getData by delegating to getTrieNode 2025-09-05 13:14:34 +03:00
Xinhe Wang
3d19696f3b Fix casting error in KeyStrokeTrie.getEntries
Return an empty sequence if the prefix node is not found in `KeyStrokeTrie`.
Passing a non-existent prefix previously would result in a casting error.
2025-09-05 13:14:34 +03:00
Matt Ellis
572c24ff31 Insert text from incsearch end offset 2025-09-05 12:37:45 +03:00
Matt Ellis
c4a43eef92 Support insert filename literally 2025-09-05 12:37:45 +03:00
Matt Ellis
c22992c16c Extract find filename at cursor to VimSearchHelper 2025-09-05 12:37:45 +03:00
Matt Ellis
01a612ad60 Add insert filename under caret action 2025-09-05 12:37:45 +03:00
Matt Ellis
606e5c6a9f Add 'isfname' option, not yet applied
Relates to VIM-4018
2025-09-05 12:37:45 +03:00
Matt Ellis
93ef18b32c Remove unnecessary JvmField annotations 2025-09-05 12:37:45 +03:00
Matt Ellis
fa4c62ebde Add insert big word at cursor literally action
Relates to VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
c5f6b2e336 Add insert big word at cursor command line action
Relates to VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
1e27220eaa Support insert word literally
Inserting a word and inserting it literally is the same operation. No need for another action

Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
b5484345f8 Add insert word under caret action for command line
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
5d68ba26c2 Add insert current line literally action 2025-09-05 12:37:45 +03:00
Matt Ellis
5c8ca893e1 Insert current line by replaying keys 2025-09-05 12:37:45 +03:00
Matt Ellis
6aff6a07af Add insert current line in command line
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
c580aaceed Add insert register literally action
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis
d204860a26 Remove write action from insert register action
Fixes VIM-3650
2025-09-05 12:37:45 +03:00
Matt Ellis
4bd4aefaca Add minor optimisation for simple register contents 2025-09-05 12:37:45 +03:00
Matt Ellis
161bb2b28b Insert register by replaying keys 2025-09-05 12:37:45 +03:00
Matt Ellis
4be143f4ff Fix move caret to previous big word to match Vim
The docs says it moves to the previous WORD, but in practice it moves to the previous whitespace character
2025-09-05 12:37:45 +03:00
Matt Ellis
4a86af9071 Fix move caret to next big word to match Vim
The docs says it moves to the next WORD, but in practice it moves to the next whitespace character
2025-09-05 12:37:45 +03:00
Matt Ellis
9a5339d8af Fix delete to use word instead of WORD 2025-09-05 12:37:45 +03:00
Matt Ellis
1a566b70d9 Add cmd history before executing
But save to register after executing. Matches Vim behaviour
2025-09-05 12:37:45 +03:00
Matt Ellis
b4eee5d45e Show indicator for current history entry 2025-09-05 12:37:45 +03:00
Matt Ellis
30dae9f4d9 Rename HistoryDownFilterAction and add tests 2025-09-05 12:37:45 +03:00
Matt Ellis
3ca51d0361 Rename HistoryDownAction and add tests 2025-09-05 12:37:45 +03:00
Matt Ellis
f282131414 Rename HistoryUpFilterAction and add tests 2025-09-05 12:37:45 +03:00
Matt Ellis
f5f14f308b Rename HistoryUpAction and add tests 2025-09-05 12:37:45 +03:00
Matt Ellis
44cb65859b Extract MoveCaretToPreviousBigWordAction 2025-09-05 12:37:45 +03:00
Matt Ellis
84eb131cea Extract MoveCaretToNextBigWordAction 2025-09-05 12:37:45 +03:00
Matt Ellis
310d90466b Extract DeletePreviousWordActionTest 2025-09-05 12:37:45 +03:00
Matt Ellis
8dd28cd257 Introduce CommandLineActionHandler base class 2025-09-05 12:37:45 +03:00
Matt Ellis
057259eba2 Move CommandKeyConsumer before CharArgumentConsumer 2025-09-05 12:37:45 +03:00
Matt Ellis
7f927ac62e Reorder register consumers 2025-09-05 12:37:45 +03:00
Matt Ellis
ecceab3fd6 Rename SelectRegisterConsumer 2025-09-05 12:37:45 +03:00
Matt Ellis
3e18fcd7f1 Rename StartSelectRegisterConsumer 2025-09-05 12:37:45 +03:00
Matt Ellis
c3c581ceb6 Rename CommandConsumer to CommandKeyConsumer 2025-09-05 12:37:45 +03:00
Matt Ellis
abf7dc51bd Add doc comments for all key consumers 2025-09-05 12:37:45 +03:00
Matt Ellis
a0d3fd9eed Rename DeleteCommandConsumer to add Count 2025-09-05 12:37:45 +03:00
Matt Ellis
f53d93016d Make it a little easier to debug key consumers
Adding an `isApplicable` function allows avoiding stepping into irrelevant consumers
2025-09-05 12:37:45 +03:00
dependabot[bot]
739336ca45 Bump org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.8.1 to 1.10.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.8.1...1.10.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 09:52:39 +03:00
dependabot[bot]
759df9eb22 Bump org.jetbrains:annotations from 26.0.2 to 26.0.2-1
Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 26.0.2 to 26.0.2-1.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/26.0.2...26.0.2-1)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-version: 26.0.2-1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 09:36:07 +03:00
Alex Plate
de809b528b [API] Turn OptionScopeImpl into an object 2025-08-29 18:11:26 +03:00
Alex Plate
c6adc48e81 [API] Make option() function return a value
This allows users to easily retrieve values from option scope:
val x = option { get<Int>("history") }

- Changed option() signature from Unit to generic T return type
- Updated VimApiImpl implementation to return the lambda result
- Added test demonstrating the new return value capability
2025-08-29 18:11:26 +03:00