Matt Ellis and Alex Plãte
6defddd24c
Extract variable expression assignment
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
a916b4de9c
Rename Variable to VariableExpression
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
8a0bdfd18f
Improve sublist expression compatibility
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
3eb0ac9207
Remove tests for indexed expressions
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
d71b99b8d5
Update SublistExpressionTest.kt
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
db8736dcf4
Extract sublist expression assignment
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
4c3cefc1e6
Add typename for reporting purposes
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
b11fc4895b
Support assigning to negative index
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
b7ce946af3
Extract sublist expression assignment
...
Also allows whitespace inside indexed expression
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
5a45f6d945
Improve evaluating indexed expressions
...
Support negative indexes, float indexes, and indexing numbers
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
6622f15ea3
Allow dictionary to be indexed by Float
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
fd1fe51633
Extract indexed expression assignment
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
91459edf6c
Rename OneElementSublistExpression
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
01d92acd40
Improve validation for concatenation
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
6d18288883
Fix validation for modulo operator
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
7ffca59450
Support double-dot concatenation assignment
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
61df4f342d
Support Float in concatenation handler
...
Surprisingly Float is converted to String, and then concatenated. But this is only supported for the binary concatenation operator, not the compound assignment concatenation operator. This lead to improved validation and behaviour closer to Vim.
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
cb1c0298ff
Improve exception handling in tests
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
56d5af6bc9
Allow assigning Float to Register
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
1dbe3e4aa1
Update RegisterExpression to assign value
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
7256731572
Rename Register to RegisterExpression
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
dc5b45a52d
Update OptionExpression to match Vim behaviour
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
063317b0c9
Introduce LValueExpression, update OptionExpression
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
37b6768148
Rename LetCommand.variable to lvalue
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
5ce2887391
Extract and add tests for sublist expressions
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
4ab91150d6
Extract and add tests for indexed expressions
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
9ddd074916
Extract tests for let command with register lvalue
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
a321bb28c0
Extract tests for let command with option lvalue
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
8c9df332aa
Add tests for let command with variable lvalue
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
356a748181
Add tests for let command operators
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
7fe01cd885
Add string() Vim function
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
68f0e162e2
Update out of date error message
2025-10-02 17:26:38 +03:00
Matt Ellis and Alex Plãte
b6ffc7a357
Use injector instead of directly using helper
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
6f259f5207
Extract E474 error message
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
a9e503d13f
Extract error messages from code
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
5297193649
Assert full error message, not partial
...
There's no good reason to only check a partial match. Make sure the entire string is correct.
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
4c84241d2a
Remove unnecessary error text messages
...
Let the IDE do this from the code
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
612dfe321c
Fix typo
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
c0f9f0bcbc
Rename cryptic error messages to error codes
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
e7769e33d7
Remove or rename unnecessary messages
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
c725447c00
Refactor messages for ActionListCommand
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
920ac0546e
Replace custom errors with error codes
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
c5e3c9ccf1
Rename messages to be more consistent
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
f8d5d049bc
Simplify code to remove duplicate error message
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
5c45c62c5b
Rename some error message identifiers
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
f1d0206c66
Refactor code to remove unnecessary messages
...
The code doesn't require nullable arguments, which removes null check error messages. Also removed some "not implemented" messages from resources. There's no need for them to be in resources, hopefully we'll implement them soon.
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
e00960ebbc
Tidy up host message bundle
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
fd6fe37c8f
Remove unnecessary Msg class
...
Using string identifiers means the IntelliJ resource tooling works better
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
76087fea93
Split host and engine bundles
...
This allows IntelliJ's property annotations to help in code
2025-09-16 16:33:40 +03:00
Matt Ellis and Alex Plãte
ec125c9c7e
Restore API for external plugin compatibility
2025-09-12 12:56:58 +03:00
Matt Ellis and Alex Plãte
d4df794d3c
Show message if no mapping found
2025-09-09 14:06:38 +03:00
Matt Ellis and Alex Plãte
4c48b4cd42
Update comments and other PR feedback
2025-09-08 09:58:34 +03:00
Matt Ellis and Alex Plãte
aa46713d3d
Move deprecated functions to bottom of class
2025-09-08 09:58:34 +03:00
Matt Ellis and Alex Plãte
aef0515183
Replace asDouble with a new toVimFloat function
2025-09-08 09:58:34 +03:00
Matt Ellis and Alex Plãte
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 and Alex Plãte
fdda1f0eb6
Refactor VimInt.parseNumber
2025-09-08 09:58:34 +03:00
Matt Ellis and Alex Plãte
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 and Alex Plãte
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
Matt Ellis and Alex Plãte
572c24ff31
Insert text from incsearch end offset
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
c4a43eef92
Support insert filename literally
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
c22992c16c
Extract find filename at cursor to VimSearchHelper
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
01a612ad60
Add insert filename under caret action
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
606e5c6a9f
Add 'isfname' option, not yet applied
...
Relates to VIM-4018
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
93ef18b32c
Remove unnecessary JvmField annotations
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
fa4c62ebde
Add insert big word at cursor literally action
...
Relates to VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
c5f6b2e336
Add insert big word at cursor command line action
...
Relates to VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
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 and Alex Plãte
b5484345f8
Add insert word under caret action for command line
...
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
5d68ba26c2
Add insert current line literally action
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
5c8ca893e1
Insert current line by replaying keys
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
6aff6a07af
Add insert current line in command line
...
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
c580aaceed
Add insert register literally action
...
Fixes VIM-2511
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
d204860a26
Remove write action from insert register action
...
Fixes VIM-3650
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
4bd4aefaca
Add minor optimisation for simple register contents
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
161bb2b28b
Insert register by replaying keys
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
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 and Alex Plãte
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 and Alex Plãte
9a5339d8af
Fix delete to use word instead of WORD
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
b70f15584f
Remove obsolete comments
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
38928e82c8
Extract insert literal command line tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
aa5975485e
Extract digraph command line tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
b6be329a08
Add tests for saving history when cancelling ex field
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
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 and Alex Plãte
b4eee5d45e
Show indicator for current history entry
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
30dae9f4d9
Rename HistoryDownFilterAction and add tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
3ca51d0361
Rename HistoryDownAction and add tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
f282131414
Rename HistoryUpFilterAction and add tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
f5f14f308b
Rename HistoryUpAction and add tests
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
6557169eec
Remove unnecessary textExInput function
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
ed402d3b26
Extract ToggleOverstrikeActionTest
...
Vim calls this "overstrike". We'll update terminology to match.
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
44cb65859b
Extract MoveCaretToPreviousBigWordAction
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
84eb131cea
Extract MoveCaretToNextBigWordAction
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
9ce2c2ba3a
Extract MoveCaretToLineEndActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
549d4a722f
Extract MoveCaretToLineStartActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
667890cb4d
Extract InsertRegisterActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
1ebaa34bda
Extract DeleteToCaretActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
310d90466b
Extract DeletePreviousWordActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
822052358e
Extract DeletePreviousCharActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
d1eb1aeb4d
Extract DeleteNextCharActionTest
2025-09-05 12:37:45 +03:00
Matt Ellis and Alex Plãte
8dd28cd257
Introduce CommandLineActionHandler base class
2025-09-05 12:37:45 +03:00