1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-07-03 17:38:52 +02:00
Commit Graph

5146 Commits

Author SHA1 Message Date
Alex Plate
c3fa093d32
Upgrade the code to use the 2025.1 functions 2025-05-08 17:47:35 +02:00
Alex Plate
a94d509441
Remove other code deprecations 2025-05-08 17:33:41 +02:00
Alex Plate
12fd5bc79a
Remove deprecated functions 2025-05-08 17:20:58 +02:00
Alex Plate
57ecd25640
Refactor MacKeyRepeat.kt in order to remove the deprecated methods use 2025-05-08 17:18:17 +02:00
Alex Plate
09d37ebd38
Convert MacKeyRepeat to kotlin 2025-05-08 17:11:39 +02:00
Alex Plate
81bc3f1f1b
Rename .java to .kt 2025-05-08 17:11:39 +02:00
Alex Plate
9e3058dace
Code cleanup: remove some deprecations from the source code 2025-05-08 17:04:25 +02:00
M. V
35b9eaae3e VIM-2263 Add a not-null assertion operator to getRegister function to since assertions won't be executed if register does not exist 2025-05-07 18:54:26 +02:00
M. V
4eee1d3192 VIM-2263 Add additional tests that check the content of the registers 2025-05-07 18:54:26 +02:00
M. V
3c2e2bfb68 VIM-3771 Add a smile command with python ascii art 2025-05-07 18:54:12 +02:00
M. V
3f75b6db6d VIM-3771 Add a smile command with java ascii art 2025-05-07 18:54:12 +02:00
M. V
5fd318bf88 VIM-3771 Add a smile command with kotlin and default ascii art 2025-05-07 18:54:12 +02:00
M. V
6d34c70a9d VIM-3771 Rename VirtualFile.kt to VimVirtualFile.kt and add a new property extension 2025-05-07 18:54:12 +02:00
Alex Plate
5bf2b51c5d
Add a comment about the change 2025-05-05 17:00:33 +02:00
Ivan.Yarkov
5959fc2824 RIDER-123506 don't insert line break on enter in insert mode for Rider 2025-05-05 16:59:57 +02:00
Alex Plate
a9f9ae3727
Fix(VIM-3786): Make a workaround to fix shift-enter in AI chat 2025-04-29 19:36:05 +03:00
Alex Plate
8bfcd13c33
Fix(VIM-3882): Register the VimShortcutAction to the editor component instead of its wrapper
It turned out the editor.getComponent returns not the editorComponent, but the parent of the component. This caused no problems until the AI plugin started to register enter/esc on the editor component directly. Since an editor component is more specific than the component with vim actions, the vim shortcuts were suppressed.

In this change, we start to register shortcuts on the editor component directly, allowing them to properly work on the same level as AI shortcuts. This is also the level where the shortcuts are supposed to be registered.
2025-04-28 17:55:18 +03:00
Matt Ellis
70d662fe28 Remove obsolete internal options 2025-04-22 15:48:19 +03:00
Alex Plate
8247392dc3
Fix some compilation warnings 2025-04-16 22:12:36 +03:00
Alex Plate
443e50b55f
Add tests for case changing
Mostly to highlight that commands in format `gugu` and `gUgU` don't work for the moment
2025-04-16 19:44:38 +03:00
Alex Plate
1891216182
Fix(VIM-3878): Support ROT13 command g? 2025-04-16 19:44:38 +03:00
Alex Plate
5d2852420a
Remove the duplication method for existing the select mode 2025-04-15 09:20:00 +03:00
Matt Ellis
e86503798a Remove special case handling for Plug mapping
While it might not make sense to replay an incorrect `<Plug>` or `<Action>` mapping as characters where they are likely to cause unexpected behaviour as Normal commands, this is standard Vim behaviour (at least for `<Plug>`).

Note that `<Plug>` (and `<Action>`) is a special key code that cannot be typed. In Insert mode, Vim expands it to the text "<Plug>".
2025-04-10 19:32:29 +03:00
Matt Ellis
9b4f114d61 Refactor MappingProcessor
Extract single implementation for replaying unhandled keys and update to match the longest mapping that fits in the unhandled keys.
2025-04-10 19:32:29 +03:00
Matt Ellis
3155556832 Reformat and update comments for MappingProcessor
Minor refactorings, should be no changes in logic
2025-04-10 19:32:29 +03:00
Matt Ellis
07190f38c9 Fix :normal command with multi-letter mapping 2025-04-10 19:32:29 +03:00
Matt Ellis
db116faa32 Fix handling of modes in NormalCommand
All commands are called in Normal, so there is no need to check mode at execution time. The SAVE_VISUAL flag is perhaps poorly named, as it still change to Normal mode, but will save the current selection for commands that need (usually because they interact with IDE features). The `:normal` command does not need the current selection.
2025-04-10 19:32:29 +03:00
Matt Ellis
58496fa1a1 Uncomment NormalCommandTest.kt 2025-04-10 19:32:29 +03:00
Alex Plate
8af848cef6
Fix(VIM-3861): Fix the debug action execution 2025-03-31 12:33:18 +03:00
Matt Ellis
6d3bde3ad5 Fix incorrect implementation of DoesNotMatchHandler 2025-03-28 19:07:06 +02:00
Matt Ellis
3b2b863c88 Update truthy expressions 2025-03-28 19:07:06 +02:00
Matt Ellis
e2cc9c648f Introduce toVimString to match toVimNumber 2025-03-28 19:07:06 +02:00
Matt Ellis
51ea947ccb Move comparison operator data rules to base class 2025-03-28 19:07:06 +02:00
Matt Ellis
5f8d552e8a Extract error message 2025-03-28 19:07:06 +02:00
CCCC-L
440cab1674 CommentaryTextObject no longer contains spaces to be consistent with neovim 2025-03-28 18:45:42 +02:00
Alex Plate
9322e3b81b
Update intellij gradle plugin 2025-03-28 18:40:26 +02:00
Matt Ellis
e232cb3ceb Support 32-bit Unicode codepoints in digraphs
Fixes VIM-3842
2025-03-28 18:13:14 +02:00
Matt Ellis
a33b3980ab Fix unhandled key stroke after surround operation
Fixes VIM-3841
2025-03-28 17:51:14 +02:00
Matt Ellis
7917c83cb5 Add extra tests for line() function behaviour
It's not obvious that line('v') will return the opposite end of the current selection. Add some tests to highlight this.

Relates to VIM-3838
2025-03-28 17:23:41 +02:00
Matt Ellis
421c3bbfb8 Support <C-U> in commandToKeys 2025-03-28 17:23:41 +02:00
Matt Ellis
dbd097a91a Fix caret position after :move command
Fixes VIM-3837
2025-03-28 17:23:41 +02:00
Alex Plate
30f019aa18
Fix enter for Clion Nova 2025-03-28 15:35:33 +02:00
Alex Plate
543d8dbb13
Fix(VIM-3856): Disable new way of action execution for CLion 2025-03-28 14:05:53 +02:00
Alex Plate
2800b2d5fc
Fix(VIM-3857): Fix pasting for the client 2025-03-28 13:45:13 +02:00
Alex Plate
cd27ce8004
Fix(VIM-3852): Fix incorrect cast while checking the shortcuts 2025-03-28 13:27:59 +02:00
Alex Plate
b043296cde
Fix(VIM-3826): Fix action execution in Rider 243 and older versions
It still doesn't work fine when executing in format `:action ReformatCode` in 243, but with 251 format updates from Rider, it should be fine.
2025-03-27 17:20:23 +02:00
Alex Plate
7144d73488
Mute a slow operation related to VIM-3648 2025-03-27 14:12:55 +02:00
Alex Plate
7c39e9e585
Fix the runForEachCaret exception 2025-03-14 17:40:19 +02:00
Alex Plate
abdb6cb906
Fix(VIM-3825): Proper processing of enter for Rider & similar IDEs 2025-03-14 13:39:36 +02:00
Ilya Usov
f40540d114
Fix IdeaVim state after starting the template in remdev scenario
Now the template is properly detected on client as well.

Related: RIDER-118965
2025-03-13 11:50:10 +02:00
Alex Plate
d52d631799
Cleanup of the IjActionExecutor 2025-03-11 17:44:43 +02:00
Alex Plate
84b485c6bc
Use the proper context component when firing an action 2025-03-11 17:44:43 +02:00
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
Alex Plate
f76b07521e
Fix(VIM-3827): Fix an incorrect implementation of the >= operator
As a note: This is the first bug in IdeaVim that was fixed by AI (with manual verification, of course).
2025-03-10 10:50:26 +02:00
Alex Plate
55257e1017
Use VimTestCase in operator tests
Otherwise it was not possible to run just one test as the injector was not initialized
2025-03-10 10:42:08 +02:00
Alex Plate
fc93661c62
Fix an issue that the XML config can't store nulls 2025-03-07 18:09:49 +02:00
Alex Plate
09321f409c
Fix recursive runForEachCaret and a missing read action 2025-03-07 17:41:13 +02:00
Alex Plate
393d2d4353
Fix the issue that backspace key was not working in the code review comments for GitHub
The context component should be detected automatically
2025-03-07 16:48:43 +02:00
Alex Plate
4a31e425e0
Support per-caret selection type during yanking 2025-03-07 10:01:36 +02:00
Nath Tumlin
156fbcd60d Make yank motion respect exclusive-linewise
I used the code in VimChangeGroupBase.getDeleteRangeAndType to do the check.

For an example of what this fixes, with the document:
```
    ${c}Hello!
```
executing "y}llp" before this change yields
```
    HelHello!
    lo!
```
but doing it with this change yields
```
    Hello!
    Hello!
````
2025-03-07 09:07:53 +02:00
Alex Plate
cf49c0b76f
Fix threading for property tests 2025-03-04 18:06:52 +02:00
Alex Plate
ce01318032
Do not run test in nvim which executes IDE action 2025-03-04 17:40:09 +02:00
Alex Plate
3d1b502cd0
Wait for the action to be finished before returning the result 2025-03-04 17:31:43 +02:00
Alex Plate
572af0d349
Fix issue with esc
Currently, esc action will return false as it have no action in the editor. However, it doesn't mean that IdeaVim goes into the error mode
2025-03-04 17:27:45 +02:00
Alex Plate
681cef1d69
Enable the new way of action execution by default 2025-03-04 15:37:54 +02:00
Alex Plate
f88a1cbe06
Add more wrappings for read actions 2025-03-04 15:36:18 +02:00
Alex Plate
38102afc0f
Upgrade version of kotlin to 2.0.21 2025-02-28 19:22:16 +02:00
Alex Plate
8483e23ea7
[VIM-3376] Add a new way of executing the action 2025-02-28 19:07:55 +02:00
Alex Plate
dbc626c794
Add a note about the octopus handler description 2025-02-28 17:38:20 +02:00
Alex Plate
692e4434d1
[VIM-3815]: Disable Octopus Handler for Rider and other IDEs with the new typing engine 2025-02-28 17:14:06 +02:00
Alex Plate
89e530276f
Get rid of the AppCode-specific code
AppCode was sunset, so there is no need to support it in IdeaVim
2025-02-28 17:14:06 +02:00
Alex Plate
0b7c86fa7e
Use the read action to get the caret offset in EditorSelectionHandler 2025-02-26 10:13:45 +02:00
Matt Ellis
ca4de6f317 Add missing shortcuts for WORD left/right in Select 2025-02-25 15:38:49 +02:00
Filipp Vakhitov
75dadc9610 Fix(VIM-3802): Completion should create undo checkpoint
Do not create checkpoints for Enter keypress
2025-02-25 15:09:41 +02:00
Filipp Vakhitov
f6146b8732 Fix(VIM-3802): Completion should create undo checkpoint 2025-02-25 14:36:46 +02:00
Alex Plate
4025619b48
Turn write action while executing the IJ action into an error 2025-02-24 14:40:42 +02:00
Alex Plate
9b1da76499
Remove unneeded write action in output panel 2025-02-24 14:39:59 +02:00
Alex Plate
4ca25eed70
Remove the use of write action in macros 2025-02-24 14:31:14 +02:00
Alex Plate
e257a10525
Fix an issue that the highlighting was silently missing due to an error 2025-02-24 12:13:51 +02:00
Alex Plate
42d80f6866
Add write action in several places 2025-02-21 19:32:47 +02:00
Alex Plate
fedefea0aa
Remove the write action in several places 2025-02-21 18:56:52 +02:00
Alex Plate
437fa9a1a0
Remove the root write and read actions
Historically, IdeaVim was starting read or write action based on command type. However, this is incorrect because of several reasons:
- The command of different type may perform a write/read action
- The write lock with a lot of code inside does cause application freezes
- Since a large branching of code happens inside the write action, there is a chance of read action request, resulting in the deadlock

Also, now this prevents from implementing a proper execution of VIM-3376.
2025-02-21 18:44:51 +02:00
Alex Plate
0511ee277f
Remove the requirement for the write action in macros
It's not clear why the write action was needed. Probably, it was a mistake and it supposed to be a check for EDT. However, since the check for EDT exists right in the constructor of the potemkin progress, let's remove it at all.
2025-02-21 17:40:40 +02:00
Alex Plate
45d92c1981
Use the read action for neovim tests in other place 2025-02-21 13:33:53 +02:00
Alex Plate
58de834832
Use the read action for neovim tests 2025-02-21 13:17:37 +02:00
Alex Plate
3866565e51
Remove IdeaVimTestCase and replace it with VimTestCase 2025-02-21 13:03:23 +02:00
Alex Plate
564ab7d75e
Remove EDT and write action from the VimTestCase 2025-02-21 09:54:12 +02:00
Matt Ellis
43a2bd98db Reduce multiple implementations to one 2025-02-21 09:53:11 +02:00
Matt Ellis
4787a5e22a Rewrite backwards search for word under cursor 2025-02-21 09:53:11 +02:00
Matt Ellis
1a8789b50c Rewrite next/previous word motions and objects 2025-02-21 09:53:11 +02:00
Matt Ellis
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
cad6afdc9d Rewrite word end motions and word objects 2025-02-21 09:53:11 +02:00
Matt Ellis
54ef691a98 Add tests for outer word motions and blank lines 2025-02-21 09:53:11 +02:00
Matt Ellis
426c2fd006 Handle blank and empty lines for text objects
Fixes VIM-1642
2025-02-21 09:53:11 +02:00
Matt Ellis
f25c56b545 Refactor checks for including following whitespace 2025-02-21 09:53:11 +02:00
Matt Ellis
960eb50d8c Fix incorrectly selected new line char with viw 2025-02-21 09:53:11 +02:00
Matt Ellis
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
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
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
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