Matt Ellis
3fa20dd417
Move status bar widgets after dotCover indicator
...
Rider's dotCover indicator is marked as "last" rather than relative to other dotnet icons. This position pushes out IdeaVim widgets, so make sure we're after "dotCoverIndicator"
See also DCVR-13021
2025-03-10 18:52:46 +00:00
Matt Ellis and Alex Pláte
ca4de6f317
Add missing shortcuts for WORD left/right in Select
2025-02-25 15:38:49 +02:00
Matt Ellis and Alex Pláte
24c0d31f14
Updated comment and defaults for word end action
...
The `ge` motion incorrectly had `stopAtEmptyLine` set to false, but `ge` always stops at empty lines. This option is only applicable for forward motion, so is ignored by the implementation of `findPreviousWordEndOne`.
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
43a2bd98db
Reduce multiple implementations to one
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
c4f56c40fd
Rename findWordUnderCursor to findWordObject
...
Starting to distinguish between the other findWordUnderCursor implementations!
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
1b4b66dbb1
Minor refactoring
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
4787a5e22a
Rewrite backwards search for word under cursor
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
d2b85cbb10
Merge inner and outer motion implementations
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
0428c2aeff
Rewrite inner motion to match outer motion
...
The implementations are so similar and can now be refactored/simplified
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
1a8789b50c
Rewrite next/previous word motions and objects
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
b5937e885d
Rewrite displayLocationInfo to avoid findNextWord
...
Simplifies and fixes counting words, especially when selection intersects words. Also moves implementation to engine and adds more tests.
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
8eef802ac7
Add notes on possible refactoring
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
cad6afdc9d
Rewrite word end motions and word objects
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
54ef691a98
Add tests for outer word motions and blank lines
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
426c2fd006
Handle blank and empty lines for text objects
...
Fixes VIM-1642
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
f25c56b545
Refactor checks for including following whitespace
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
960eb50d8c
Fix incorrectly selected new line char with viw
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
18b4b76ebf
Select trailing whitespace with viw
...
Inner word/WORD motions will select trailing whitespace at the end of a line without wrapping
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
d9e575d4a2
Select leading whitespace with viw
...
Inner word/WORD motions will select leading whitespace at the start of a line without wrapping
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
1769804c8a
Select leading whitespace with vaw
...
Outer word/WORD motions will select leading whitespace at the start of a line
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
81e094ac8f
Select trailing whitespace with vaw
...
Outer word/WORD motions will select trailing whitespace at the end of a line
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
4240c429ba
Select preceding whitespace if no following (vaw)
...
Outer word/WORD text objects should select following whitespace, unless there isn't any, and then it should select preceding whitespace.
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
76f7d81129
Minor code cleanup. No logic changes
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
2da77f0f11
Add tests for existing word/WORD text objects
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
580764b30c
Match empty line as word/WORD
...
Unless moving to end of word/WORD, in which case, skip all whitespace to get to end of the next set of word/WORD characters.
Fixes VIM-1650
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
afd69eef95
Fix end of file edge case deleting previous word
...
Adds extra tests to confirm that deleting previous word in Insert mode was already working as expected (relates to VIM-1650)
Also fixes an edge case for a test that was marked as behaving differently to Vim, but was actually showing buggy behaviour due to its unorthodox caret placement. It looked like the caret was placed at the end of the line, but it was actually placed _passed_ the last character in the file. Adding extra text below the caret placement would cause the action to behave as expected, and the test would then match Vim behaviour. However, it is possible to get this caret position in the editor and in Vim, with `virtualedit=onemore`, and the IdeaVim implementation was wrong. The test has been updated to provide the correct scenario, and the implementation has been fixed.
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
be1cc67566
Fix previous word end motion at start of file
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
b534708a99
Rename file to show it contains several actions
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
4bc75e0a9b
Add tests for existing word/WORD motion behaviour
2025-02-21 09:53:11 +02:00
Matt Ellis and Alex Pláte
5740372df9
Add err_teapot function
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
06791b9378
Add float2nr function
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
91e927c913
Add fmod function
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
9a5c558060
Add float classification functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
d1127a5238
Add power functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
613a8b5792
Add exponential functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
6f63371e9b
Add rounding functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
3b96e2eacd
Add trigonometric and hyperbolic builtin functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
ffdd6716f5
Refactor some moved tests
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
4453862ea0
Extract function tests
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
c631d0738e
Group function handlers like in Vim help
...
See `:help function-list`
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
1bd7a7596b
Support binary numbers in vimscript
...
Also supports octal with an `0o` or `0O` prefix.
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
23329cc522
Add bitwise functions
2025-02-20 19:21:31 +02:00
Matt Ellis and Alex Pláte
33b34b84b5
Add doc comment for inCommandLineModeWithVisual
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
308996c4c1
Remove Visual when updating incsearch for a command
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
1f68b756d5
Disable incsearch highlight in Visual mode
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
ed6789cb8b
Add tests updating Visual while editing incsearch
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
e9e86b07fb
Fix incsearch not updating empty selection
...
As a by-product, this also fixes an off-by-one error where incsearch would effectively treat all Visual searches as exclusive
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
a969b93ba6
Add tests for updating Visual selection with search
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
970cfadaec
Extract search highlighting related tests
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
12ed60d88e
Remove tests using obsolete newregex option
2025-01-22 17:42:30 +02:00
Matt Ellis and Alex Pláte
7548b160ae
Fix race condition resetting editor on focus gain
...
Fixes VIM-3773
2025-01-14 17:21:53 +01:00
Matt Ellis and Alex Pláte
296288f428
Ensure correct caret position when exiting Select
...
Fixes VIM-3042
2025-01-13 18:10:01 +01:00
Matt Ellis and Alex Pláte
1d5fc01d65
Fix Del and BS not working in Select mode
...
Fixes VIM-3618
2025-01-13 18:10:01 +01:00
Matt Ellis and Alex Pláte
0b308769b1
Move select toggle implementation
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
eb19d9fb11
Refactor improper usages of toggleVisual
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
bfa271b089
Reorder functions in file. No code changes
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
e299b27a5c
Update docs and remove unnecessary null parameter
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
9306d93cbf
Remove unnecessary pushVisualMode helper function
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
a28416dd9f
Update mode widget text for Select pending
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
63b3af3f65
Implement v_CTRL-O
...
From Select mode, enters Visual for a single command
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
fcc234c4fe
Rename submode to selectionType
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
2e0ef7e0b0
Enter Insert Visual/Select mode with shifted key
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
da99e1f1c3
Return to Insert when leaving Insert Normal
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
5827ad1581
Only show mode widget popup on left mouse click
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
0e587211d9
Improve isEndAllowed
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
8b8ef80a5e
Reinstate showmode tests
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
dc5ef487d2
Show additional Insert modes in showmode widget
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
eaad93903b
Simplify Mode hierarchy
...
Wanting to add `ReturnTo.SELECT` would be very tricky, as we would have to recreate the mode, but have no details about the selection type.
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
a6b2bf1c55
Remove ReturnableFromCmd marker interface
2025-01-10 11:29:44 +03:00
Matt Ellis and Alex Pláte
e3a07b6c89
Add support for CTRL-J
...
Supported in Normal, Visual, Select and Operator-pending. Also adds support for CTRL-M in Select mode.
Fixes VIM-3740
2025-01-10 10:00:28 +03:00
Matt Ellis and Alex Pláte
a005eb0612
Fix repeating change action with count
...
Fixes VIM-3729
2024-12-04 18:23:16 +02:00
Matt Ellis and Alex Pláte
8da15b8c08
Manually track last selected editor
...
This is important for initialising options. We can't rely on FileEditorManager.selectedTextEditor, as 2024.2 changed behaviour to reset to null during creation of a new editor. This fixes tests (and option initialisation) for 242.
2024-11-22 17:01:38 +02:00
Matt Ellis and Alex Pláte
e22c2b6473
Improve updating fallback window option values
...
The assumption for selection change events is no longer valid in 242, so switch approach to checking when editors are released
2024-11-22 17:01:38 +02:00
Matt Ellis and Alex Pláte
e293c1b786
Add tests for updating the fallback window
2024-11-22 17:01:38 +02:00
Matt Ellis and Alex Pláte
468ca840ed
Update options tests
...
Expanded to assert changes on all open windows, and formatted to make it a little easier to read/comprehend what's being tested
2024-11-22 17:01:38 +02:00
Matt Ellis and Alex Pláte
4f9d76ef66
Fix memory leak with non-disposed listeners
...
Fixes VIM-3319
2024-11-13 18:00:47 +02:00
Matt Ellis and Alex Pláte
4b7381901d
Fix bug removing map that is also a prefix
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
6e2cb9ba11
Reorder functions. No logic changes
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
91cd4ab01f
Add sequences to iterate keystroke trie
...
Allows iterating the trie entries without having to create a list or create a list for each entry's keystrokes.
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
34d23180bd
Avoid wrapping the keys list for each map attempt
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
fc5aaa50d8
Remove unnecessary hasmapfrom function
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
c7bbfdcaf5
Remove some test only functions
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
562906fe6d
Filter map output by prefix
...
Fixes VIM-2981
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
976771d11a
Implement smap and snoremap
...
Support for sunmap and smapclear already exists, and vmap would introduce a Select mode map.
Fixes VIM-2260
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
5fc4462b03
Support map! to map insert and cmdline modes
...
Also supports `mapclear!` and `unmap!`
Moves parsing of the bang modifier to the parser so we can tell the difference between `map! foo bar` and `map ! foo bar`
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
5f263e7014
Fix output of maps with same keys in multiple modes
...
E.g. `map foo bar` and `vmap foo baz` would only output one map for `foo` when calling `:map`. Now it will output all maps that match the ex command's modes. This change also improves the marker characters in the first column of map output.
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
4c899fcc93
Simplify test code
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
2f8fe392af
Use KeyStrokeTrie for maps
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
84c7e1159b
Introduce KeyStrokeTrie to find commands
...
Should also restore compatibility with idea-which-key
2024-11-13 17:57:31 +02:00
Matt Ellis and Alex Pláte
18d6f79796
Add missing C-PageUp/Down shortcuts to switch tab
...
Fixes VIM-2044
2024-11-13 17:52:28 +02:00
Matt Ellis and Alex Pláte
a745da9761
Add Shift+Enter mapping to scroll page forward
...
Fixes VIM-2752
2024-11-13 17:52:28 +02:00
Matt Ellis and Alex Pláte
5eb36ce428
Remove unneeded extended special name parsing
...
This was needed when action keys were registered in a comma separated list in a single XML attribute string. Additional encoding was needed for angle brackets and commas. Registration has changed, and this is no longer needed
2024-11-13 17:52:28 +02:00
Matt Ellis and Alex Pláte
92ee271f1e
Add fallback if ve guicursor option not specified
2024-11-05 12:29:13 +02:00
Matt Ellis and Alex Pláte
babc5daf3b
Use Visual-exclusive caret shape from guicursor
2024-11-05 12:29:13 +02:00
Matt Ellis and Alex Pláte
82d18cfbb9
Remove unused imports
2024-11-05 04:14:12 +02:00
Matt Ellis and Alex Pláte
b0dd75f77c
Fix deprecated API usage
2024-11-05 04:14:12 +02:00
Matt Ellis and Alex Pláte
727cfb36ba
Remove pre-242 workaround
2024-11-05 04:14:12 +02:00
Matt Ellis and Alex Pláte
a7d5c5f2d4
Remove custom version for split mode
...
Split mode run task will use the same version as runIde
2024-11-05 04:14:12 +02:00
Matt Ellis and Alex Pláte
1e02848a66
Update target IDEA version to 242
...
Note that this uses 2024.2.1 as the minimum version because 2024.2.0 is no longer available.
2024-11-05 04:14:12 +02:00
Matt Ellis and Alex Pláte
879d191800
Scroll caret into view after undo/redo
...
This is to ensure that 'scrolloff' is applied. Relates to VIM-3671
2024-10-21 15:50:58 +03:00