1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-10-22 13:42:44 +02:00
Commit Graph

7885 Commits

Author SHA1 Message Date
Filipp Vakhitov
23519bbdae Refactoring to use interfaces from vim-engine 2024-05-24 16:51:38 +03:00
Alex Plate
73fd25773a
Add test for VimIndentObject
For PR https://github.com/JetBrains/ideavim/pull/884
2024-05-24 16:20:36 +03:00
Egor Nikolaevsky
746d483179 Fix indent size calculation 2024-05-24 16:19:50 +03:00
Alex Plate
1a7e90c7d7
Bump the minimal version of IJ to 241
There are a lot of incompatibilities with IdeaVim on 241 if it's built on 233

Also, this time the special branch for the IJ version won't be created. Previously on bumping the version of IJ, we've created the branch to keep the reference to the moment when it happened. However, IJ version bumps are easy to trace anyway by git.
2024-05-24 15:37:05 +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
IdeaVim Bot
33a5480456 Add Eduardo Haesbaert to contributors list 2024-05-24 09:01:57 +00:00
Alex Plate
16cd05fc76
Fix incorrect use of visual position instead of buffer position
We should calculate the line above based on logical position rather than visual position.

This issue was detected thanks to newly introduced soft wraps and proprty tests
2024-05-24 11:39:45 +03:00
Eduardo Haesbaert
4788dacc86 Fix wording
There is one additional `the` before the preview gif, and also, changing the wording from "to" to " for".
2024-05-24 10:10:46 +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
Alex Plate
1616aff5a1
Update version of TC config 2024-05-10 16:06:28 +03:00
Alex Plate
5a82f05be8
Update version of IJ in TC tests 2024-05-10 15:46:31 +03:00
Alex Plate
3020504cdc
Rename kotlin TC config to avoid compilation issues 2024-05-10 15:36:41 +03:00
Matt Ellis
d00e802674 Update options documentation 2024-05-10 15:27:24 +03:00
Matt Ellis
c46008dddc Update Vim option even when IdeaVim is disabled 2024-05-10 15:27:24 +03:00
Matt Ellis
755000c376 Reset Vim options when IDE setting changes
Options are not reset if they've been explicitly set by the user (e.g. `:set list` or _View | Active Editor | Show Whitespaces_). They are reset if they were explicitly set in `~/.ideavimrc`.

Also bumps the IDE build number to 233.11799.241 in order to use EditorSettingsExternalizable.PropNames
2024-05-10 15:27:24 +03:00
Matt Ellis
1e4a60bfe6 Fix nullability warning 2024-05-10 15:27:24 +03:00
Matt Ellis
c9ee685956 Codify assumption re global-local external setting 2024-05-10 15:27:24 +03:00
Matt Ellis
c2b1083836 Updated descriptions as per review comments 2024-05-10 15:27:24 +03:00
Matt Ellis
3518528f22 Prevent resetting options when plugin re-enabled 2024-05-10 15:27:24 +03:00
Matt Ellis
9bed8fec79 Map 'scrolloff' and 'sidescrolloff' options
Fixes VIM-3110
2024-05-10 15:27:24 +03:00
Matt Ellis
3ffbea7d42 Match Vim's behaviour for :set[local] {option}<
String and number/toggle options have different and opposite behaviour for `:set {option}<` and `:setlocal {option}<`. This change matches Vim's behaviour.
2024-05-10 15:27:24 +03:00
Matt Ellis
39b42193cb Map 'scrolljump' and 'sidescroll' options
Fixes VIM-3110
2024-05-10 15:27:24 +03:00
Matt Ellis
c69e080b05 Add 'fileencoding' option
No tests, as I don't know how to test interaction with saving to disk
2024-05-10 15:27:24 +03:00
Matt Ellis
50b42036d1 Add 'bomb' option
No tests, as I don't know how to test interaction with saving to disk
2024-05-10 15:27:24 +03:00
Matt Ellis
340c40ceff Add 'fileformat' option
No tests, as I don't know how to test interaction with saving to disk
2024-05-10 15:27:24 +03:00
Matt Ellis
6aeffe71de Map 'number' and 'relativenumber' options 2024-05-10 15:27:24 +03:00
Matt Ellis
04c33d719e Improve relative line converter for soft wraps
It now shows visual lines relative to the caret's visual line, rather than relative to the caret's logical line. This still isn't correct, and we should be showing the relative count of Vim logical lines (buffer lines + fold lines) but this matches movement so is more helpful
2024-05-10 15:27:24 +03:00
Matt Ellis
07f1d1e8e6 Move number/relativenumber options out of engine
While they are core Vim options, they are implemented by the host, not by the engine. If another host wants to support these options, they can add them in their implementation layer.
2024-05-10 15:27:24 +03:00
Matt Ellis
6c61254c50 Add 'colorcolumn' option to show visual guides
IntelliJ ties the hard wrap right margin guide with the other visual guides, and it's not possible to show one without the other. In Vim, you can show the hard wrap margin by adding "+0" to 'colorcolumn', so in IdeaVim, we automatically add this.
2024-05-10 15:27:24 +03:00
Matt Ellis
c6efea8c34 Add 'textwidth' option
Also supports overriding local-to-buffer options with IDE values, ensuring that changes to the option/IDE value are applied to all editors for the buffer.

Fixes VIM-1310
2024-05-10 15:27:24 +03:00
Matt Ellis
80f43a7c66 Add 'cursorline' option 2024-05-10 15:27:24 +03:00
Matt Ellis
9f5d3a9a28 Add 'list' option to show whitespace
Fixes VIM-267
2024-05-10 15:27:24 +03:00
Matt Ellis
8800a4f70b Add 'breakindent' option
Fixes VIM-2748
2024-05-10 15:27:24 +03:00
Matt Ellis
990254dcac Sort ideavim.dic to make it easier to modify 2024-05-10 15:27:24 +03:00
Matt Ellis
73a1118e78 Extract base implementation for IDE backed options 2024-05-10 15:27:24 +03:00
Matt Ellis
d3bedf26cf Treat IDE value as default for 'wrap' option 2024-05-10 15:27:24 +03:00
Matt Ellis
25b29f429a Track how option value is set 2024-05-10 15:27:24 +03:00
Matt Ellis
363f821962 Introduce 'wrap' option based on IntelliJ setting
Fixes VIM-1265
2024-05-10 15:27:24 +03:00
Alex Plate
8d873c0bf1
Fix(VIM-3418): Restore mappings after plugin disable/enable
There is no need to clean up the requiredShortcuts after turning off the plugin. Also, previously this set was not populated properly and keys that were added by ideavimrc or by user were not restored
2024-05-09 08:57:12 +03:00
Alex Plate
955676ed9e
Add comments about structures for testing
Also, there is no need to clear these structures during plugin disabling
2024-05-09 08:30:47 +03:00