Commit Graph
100 Commits
Author SHA1 Message Date
Filipp Vakhitov 07b1db4b28 Fix(VIM-3518): line numbers in :g/ not displayed 2024-07-04 01:50:33 +06:00
Filipp Vakhitov dc775a0f22 Move number option to vim-engine 2024-07-04 00:11:36 +06:00
Filipp Vakhitov 10228f953e Fix(VIM-3517): Add support for global find & replace Vim-ism — :g/pattern/s//replacement/g 2024-07-03 22:34:42 +06:00
Filipp VakhitovandAlex Pláte 3313464214 Fix(VIM-3501): Global commands applied to the following lines if matches > 1 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 683ba32a15 Fix test compilation 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 90a60155e5 Move VimscriptParser to vim-engine 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte b25d06ed9e Move Vimscript visitors to vim-engine 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 706ae3dd91 Move GlobalCommand to vim-engine 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 9b15ed8181 Add VimRangeMarker 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte f355bef36b Remove deprecated SearchGroup.java 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 4391e69c48 Move DocumentSearchListener to IjVimSearchGroup 2024-06-28 13:55:06 +03:00
Filipp VakhitovandAlex Pláte 0710d80391 Remove SearchGroup from GlobalCommand 2024-06-28 13:55:06 +03:00
Filipp Vakhitov 1b0886041b Fix(VIM-3506): in command mode no longer change cursor to " 2024-06-27 15:46:22 +05:00
Filipp Vakhitov 1da7ffc052 Add more logging to spot bug in CommandConsumer 2024-06-15 22:36:28 +02:00
Filipp Vakhitov 39a85b6bc2 Add more logging 2024-06-13 20:58:07 +02:00
Filipp Vakhitov 89e016ef6c Fix infinite loop stuck because of a confirmation dialog appearing over and over 2024-06-12 10:57:45 +03:00
Filipp Vakhitov e4996f4c4d Reduce distribution size 2024-06-11 01:41:24 +03:00
Filipp Vakhitov c44ed58142 Make text deletion in change actions a part of insert sequence 2024-06-09 00:33:07 +03:00
Filipp Vakhitov 0091af2a41 Fix(VIM-547): Undo splits Insert mode edits into separate undo chunks
Add tests
2024-06-07 23:03:53 +03:00
Filipp Vakhitov d1eea68719 Support i_CTRL-G_U 2024-06-07 21:38:11 +03:00
Filipp Vakhitov 133aff7fd8 Add a return type to getInsertSequence method 2024-06-07 21:29:44 +03:00
Filipp Vakhitov efde94db7a Fix recursive forEachCaretInvocation 2024-06-07 18:05:02 +03:00
Filipp Vakhitov 6ec072b34e End inputSequence on motion in insert mode 2024-06-07 17:12:11 +03:00
Filipp Vakhitov 4027a21514 Support most* cases for starting / ending inputSequence
* - Ending inputSequence on motion in insert mode is not supported in this commit
2024-06-07 16:55:22 +03:00
Filipp Vakhitov 3665b1ab00 Improve UndoRedoHelper to split insert input into multiple undo sequences 2024-06-07 16:27:58 +03:00
Filipp Vakhitov cf6b292f0c Add methods to work with InsertSequence 2024-06-07 16:24:37 +03:00
Filipp Vakhitov 507e4173d3 Introduce InsertSequence class 2024-06-07 16:09:25 +03:00
Filipp Vakhitov abc3575d3e Fix command registration order
We should prioritize ij commands over the engine ones
2024-06-07 16:03:27 +03:00
Filipp VakhitovandAlex Pláte 2c0ff587e3 Post-review improvements 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 26c87535d6 Fix focus 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 6ac8e672be Fix compilation 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 04ee2dd1e7 Post-rebase fixes 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 3106a98aee Make IjVimSearchGroup a PersistentStateComponent instead of deprecated SearchGroup 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 73769a3472 Move one method to VimProcessGroupBase 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 085e253d77 Fix possible bug in Fleet
Previously, we executed processings first and updated the state afterward. This approach could be problematic for asynchronous key processing, as Fleet might access the current state, which, in the context of async key processing, is a snapshot before execution and does not reflect the actual current KeyHandlerState
2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte b2af8f153e Add VimScriptFunctionServiceBase 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 37fb41fca8 Remove exCommandAnnotation option 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte e2b05ab639 Move Vimscript grammar to engine 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 354fd8fef0 Remove EditorHolderService.kt 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 9b97867be1 Support replace mode in command line 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 06685d1721 Move more logic to VimCommandLine interface 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte ae4b88a06b Remove ExEntryPanel and move its method to VimCommandLine 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte c83ecc46ed Rename method 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte c32050a208 Introduce actualText and visibleText for command line 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 4a8c7227e6 Remove default value 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 55e61a7094 Remove count for command line
It was not used anywhere
2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 60977d05b6 Deprecate ExEntryPanel 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 601747f720 Changes to replace ExEntryPanel with interface and move more code to engine 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte 0c91bc3207 Changes to replace ExEntryPanel with interface and move more code to engine 2024-06-05 11:35:58 +03:00
Filipp VakhitovandAlex Pláte f5cd2c173f Changes to replace ExEntryPanel with interface and move more code to engine 2024-06-05 11:35:58 +03:00
Filipp Vakhitov ab7359ffd3 Fix options test for Windows
Thanks @citizenmatt for this patch
2024-05-29 18:48:05 +03:00
Filipp Vakhitov 7abb1fd630 Finalizing merge 2024-05-28 23:35:31 +03:00
Filipp Vakhitov 9e3ca56afd Merge branch 'refs/heads/master' into fleet
# Conflicts:
#	src/main/java/com/maddyhome/idea/vim/ui/ex/ExEntryPanel.java
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/action/ex/LeaveCommandLineAction.kt
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/action/motion/search/SearchEntryFwdAction.kt
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/action/motion/search/SearchEntryRevAction.kt
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/key/consumers/CommandConsumer.kt
2024-05-28 22:19:17 +03:00
Filipp Vakhitov 5379528e3e Minor post-review PR improvements 2024-05-28 21:52:43 +03:00
Filipp Vakhitov 12201359bc Fix unwanted triggering of IDE actions instead of Vim ones
https://github.com/JetBrains/ideavim/pull/893#pullrequestreview-2082768468
2024-05-28 21:39:14 +03:00
Filipp Vakhitov 3843a193cb Deprecate classes related to Swing TextActions 2024-05-26 23:56:27 +03:00
Filipp Vakhitov a81d54eb90 Remove VimCommandLineHelper 2024-05-24 17:18:24 +03:00
Filipp Vakhitov 23519bbdae Refactoring to use interfaces from vim-engine 2024-05-24 16:51:38 +03:00
Filipp Vakhitov 8e2fd44f55 Remove unnecessary methods from ProcessGroup 2024-05-24 14:25:51 +03:00
Filipp Vakhitov 1c84917b29 Move LeaveCommandLineAction to its own class 2024-05-24 12:58:04 +03:00
Filipp Vakhitov c5522ed19d Move ExEntryAction to vim-engine 2024-05-24 12:56:52 +03:00
Filipp Vakhitov 91e54c8b0d Replace c_CTRL-R swing TextAction implementation with proper Vim engine implementation 2024-05-23 17:31:18 +03:00
Filipp Vakhitov 15ccebfe11 Cleanup 2024-05-23 15:27:18 +03:00
Filipp Vakhitov 5c849c9105 Fix ExEntryAction 2024-05-23 02:24:34 +03:00
Filipp Vakhitov 9e99506223 Move some logic to engine 2024-05-23 01:32:48 +03:00
Filipp Vakhitov 53ea90379f Moved some search related logic to commands to simplify KeyHandler and ProcessGroup 2024-05-23 00:15:46 +03:00
Filipp Vakhitov 2619d7ebb4 Moved some classes to the same file in vim-engine
They will share some logic in future commits
2024-05-22 22:14:54 +03:00
Filipp Vakhitov 8c8a7aceca Moved some classes to the same file in vim-engine
They will share some logic in future commits
2024-05-22 22:12:34 +03:00
Filipp Vakhitov 726b885b60 More obvious processing of ex-commands.
1. Now we have two parallel commandBuilders: for the editor and for the command prompt. It's done for sequence of keys like `d/foo<C-R>"<CR>` where we have two different commands that are built at the same time.
2. We simplified the CommandConsumer and made the logic more straightforward. `/`, `?` and `:` enter the command mode, while pressing final `<CR>` fires the command execution.
2024-05-22 22:04:32 +03:00
Filipp Vakhitov a6994a09c3 Add support for commands that can be executed either once or for each caret depending on some circumstances
In a future commit, I'm going to make ProcessExEntryAction responsible for processing both search and ex commands. Search commands are motions that are executed for each caret, while ex-commands are executed once. The per-caret code is held internally by the ex commands themselves.

The current solution is definitely not the right one, and the whole ex command subsystem needs to be reviewed and refactored:

1. Some commands can be motions, which is currently not supported.
2. We need to figure out a gentle way of handling multiple carets.
2024-05-22 15:44:12 +03:00
Filipp VakhitovandAlex Pláte 423ed390a2 Fix(FL-25087): p in vim mode
Pasting was broken with immutable carets because the old caret was not updated during execution
2024-03-29 14:52:52 +02:00
Filipp VakhitovandAlex Pláte 7652b16ca6 Move more MotionGroup methods to its base class 2024-03-29 14:52:52 +02:00
Filipp VakhitovandAlex Pláte 618a010c15 Move some MotionGroup methods to its base class 2024-03-29 14:52:52 +02:00
Filipp VakhitovandAlex Pláte d44a34ed9b Remove unnecessary abstract method 2024-03-29 14:52:52 +02:00
Filipp VakhitovandAlex Pláte c84fc996db Move some methods to vim-engine
The more methods we have in the engine, the fewer number of methods we will need to implement in the Fleet
2024-03-29 14:52:52 +02:00
Filipp VakhitovandAlex Pláte 43f232543b Replace findBlockRange with newer implementation
The newer implementation is a part of the vim-engine library and uses new methods from the SearchGroup.kt, but it is not fully refactored yet
2024-03-29 14:52:52 +02:00
Filipp Vakhitov 9a324ab448 Reset KeyHandlerState when switching Editors
Now we have a single state for all the editors, so we should not mix their states
2024-02-29 20:27:46 +02:00
Filipp Vakhitov a94a8b8539 Fix tests 2024-02-24 01:03:18 +02:00
Filipp Vakhitov 261230b23a Remove experimental showmodewidget option 2024-02-24 00:36:36 +02:00
Filipp Vakhitov b90317e00e More visible text color for mode widget
Visibility may be unexpected for custom themes with non-obvious colors
2024-02-24 00:27:48 +02:00
Filipp Vakhitov 21c9dc8785 Add statistic collector for mode widget 2024-02-24 00:15:01 +02:00
Filipp Vakhitovandfilipp 1a4333fa1b Move implementations to upper level
It will simplify support of immutable editors in Fleet
2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 8eaa6df318 Throw error instead of warning on state conflict
It may indicate some serious issues, and we would like to know if anything goes wrong
2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 7523db186f Empty status bar message after each test 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 38bc914504 Avoid using annotation-processors in vim-engine 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp c8113eea83 Commit state after receiving unknown key 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 924b7418e8 Fix DigraphSequence cloning 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp a7dfef61e9 Make LazyVimCommand open 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp db35c979b4 Move some editor methods to the base class 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 2de933c723 Make processKey public 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 00f5541dc6 Add KeyProcessResult interface 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 02540eb303 Pass KeyHandlerState as a method argument 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 282e581bdb Make state cloneable 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 31e7c49608 Add equals & hashCode 2024-02-23 15:09:45 +02:00
Filipp Vakhitov 2a1c4b3a1c Better widget order 2024-02-06 00:32:25 +02:00
Filipp Vakhitovandlippfi 63995e8c61 Support e flag for search 2024-02-05 16:29:49 +02:00
Filipp Vakhitovandlippfi 7062d9b8f8 Enable new regex engine by default 2024-02-05 16:29:49 +02:00
Filipp Vakhitovandlippfi ede62f5c75 Fix compilation 2024-02-05 16:29:49 +02:00
Filipp Vakhitovandlippfi 6386770ff3 Move more tests to src 2024-02-05 16:29:49 +02:00
Filipp Vakhitovandlippfi b4e831a81f Fix VisualAreaMatcher & TextRange 2024-02-05 16:29:49 +02:00