1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-10-09 13:26:57 +02:00
Commit Graph

9045 Commits

Author SHA1 Message Date
Mia Vucinic
3b2785fc94 have dispose method called when the ideavim plugin is disabled and init when enabled 2025-07-21 21:06:38 +02:00
Mia Vucinic
bdaf0e2389 remove unnecessary options 2025-07-21 21:06:38 +02:00
Mia Vucinic
91fdc91f69 add proper implementation for put data functions 2025-07-21 21:06:38 +02:00
Mia Vucinic
764a45c99a fix get variable test 2025-07-21 21:06:38 +02:00
Mia Vucinic
abbc46a3ed add a mapping owner to vim scope 2025-07-21 21:06:38 +02:00
Mia Vucinic
98f8226246 add listener scope implementation 2025-07-21 21:06:38 +02:00
Mia Vucinic
d2f73a6102 add a listener owner to all listeners 2025-07-21 21:06:38 +02:00
Mia Vucinic
267313a2e0 get rid of editor as a constructor parameter in scopes 2025-07-21 21:06:38 +02:00
Mia Vucinic
55d2371574 add editor service 2025-07-21 21:06:38 +02:00
Mia Vucinic
3a63ed596f add implementation with templates for getVariable function 2025-07-21 21:06:38 +02:00
Mia Vucinic
a5f379a943 add VimPlugin dsl annotation on editor scope 2025-07-21 21:06:38 +02:00
Mia Vucinic
24a0322b5a add more functions to the read 2025-07-21 21:06:38 +02:00
Mia Vucinic
1a968f7721 move update caret to caret transaction 2025-07-21 21:06:38 +02:00
Mia Vucinic
02a8a84728 rename editor to vimEditor 2025-07-21 21:06:38 +02:00
Mia Vucinic
6a896664ed introduce editor scope 2025-07-21 21:06:38 +02:00
Mia Vucinic
4d01f286f5 introduce caret scope 2025-07-21 21:06:38 +02:00
Mia Vucinic
9ab97106d7 make isRepeatable false by default 2025-07-21 21:06:38 +02:00
Mia Vucinic
f1cb9247d1 add mapping scope 2025-07-21 21:06:38 +02:00
Mia Vucinic
e946e74840 merge two mappings into one 2025-07-21 21:06:38 +02:00
Mia Vucinic
4db3e91d6a huge refactoring
- In the `api` module:
  - remove dependency on `vim-engine` module due to circular dependencies
  - move implementations of scopes to the `vim-engine`
  - add VimPluginDsl annotation to interfaces
  - make VimScope abstract class
  - remove ScopeBuilders file and move scope builders to the VimScope abstract class
 - In the `vim-engine` module:
  - add dependency on `api` module
  - add implementation of scopes
  - in VimInjector add new field - pluginService (reason for that is because functions from VimExtensionFacade are not available in the VimEngine)
2025-07-21 21:06:30 +02:00
Mia Vucinic
cf95ea1fc9 add a proper implementation for getVariableInt 2025-07-21 21:05:43 +02:00
Mia Vucinic
20fe881597 move scopes to packages 2025-07-21 21:05:43 +02:00
Mia Vucinic
617eee6237 hide instances of editor, context and VimPluginApi from the user 2025-07-21 21:05:43 +02:00
Mia Vucinic
86b9238e5f have functions in VimPluginApi take editor and context as parameters instead of scopes 2025-07-21 21:05:43 +02:00
Mia Vucinic
4583b65a3e remove VimInitPluginScope 2025-07-21 21:05:43 +02:00
Mia Vucinic
a283ee02ab rename VimPluginScope to VimScope 2025-07-21 21:05:43 +02:00
Mia Vucinic
5ca3af6643 remove VimBehaviorDiffers annotation from tests where that is no longer the case 2025-07-21 21:05:43 +02:00
Mia Vucinic
08d0bcd6ec fix tests to match vim behavior 2025-07-21 21:05:43 +02:00
Mia Vucinic
8ea9b29e5e first api draft 2025-07-21 21:05:43 +02:00
Matt Ellis
7d44c87873 Move ex prompt character out of API
The prompt character is now implemented as a custom view, only in the UI, and not inserted directly into the text. This simplifies management of the text (and removes/fixes an exception due to manually handling prompt offset), and also allows highlighting of the prompt character.
2025-07-21 18:43:28 +03:00
Matt Ellis
b67c3d7bab Add extra logging details
Randomly hit this condition, but don't know how
2025-07-21 18:43:28 +03:00
Matt Ellis
261b910845 Add tests for rendering control characters 2025-07-21 18:43:28 +03:00
Matt Ellis
ac15372901 Use actualText instead of visibleText 2025-07-21 18:43:28 +03:00
Matt Ellis
2a603a681c Simplify implementation of VimInputInterceptor 2025-07-21 18:43:28 +03:00
Matt Ellis
a208ad7598 Remove unnecessary ex cmdline without shortcuts
We don't need a secondary UI element hierarchy without shortcuts because the shortcuts are no longer handled by the UI, but by the key handler. This secondary instance was used by modal input, and this is also managed by the key handler, consuming key strokes first if a modal input prompt is active
2025-07-21 18:43:28 +03:00
Matt Ellis
dde287073e Only create modal input panel when needed 2025-07-21 18:43:28 +03:00
Matt Ellis
0e07f0c78e Show special keys in a different colour
Mimics Vim's `SpecialKey` highlight. Currently uses IntelliJ's "Whitespaces" colour, which seems like the best fit.
2025-07-21 18:43:28 +03:00
Matt Ellis
c0f412547f Maintain narrow caret width for non-printable chars 2025-07-21 18:43:28 +03:00
Matt Ellis
ddf1612d11 Fix scrolling issues editing long command lines
Instead of replacing the whole string, which will reset scroll position, delete or insert the required text/offsets, and let the text field manage scroll position
2025-07-21 18:43:28 +03:00
Matt Ellis
bf32c5d5b5 Render control characters in ex cmdline 2025-07-21 18:43:28 +03:00
Matt Ellis
6e6cd722d4 Support insertion of control chars in command line
Fixes VIM-3907, fixes VIM-239
2025-07-21 18:43:28 +03:00
Matt Ellis
356b4ed8c4 Remove unnecessary mouse listener 2025-07-21 18:43:28 +03:00
Matt Ellis
84a3d0457d Simplify and document keymap handling
All key handling is done with the Vim pipeline, so make sure we don't have any Swing key bindings registered. This is quite confusing, so document what's going on
2025-07-21 18:43:28 +03:00
Matt Ellis
d4f4f7661c Remove unnecessary action registration
We don't have any custom actions, so there's nothing to register
2025-07-21 18:43:28 +03:00
Matt Ellis
0e9c3d9d87 Replace constants with enum 2025-07-21 18:43:28 +03:00
Matt Ellis
654b95147b Simplify command line keystroke dispatching
Pass the keystroke to the key handler directly rather than relying on the superclass to call a default action handler that would do the dispatching
2025-07-21 18:43:28 +03:00
Matt Ellis
a2fb8acd47 Remove obsolete ExShortcutKeyAction
All CMD_LINE actions are registered the same as other Vim commands, which means all shortcuts are already registered with the IDE's action system. The existing VimShortcutKeyAction class will dispatch shortcuts to the key handler, where they will be handled as real CMD_LINE actions.
2025-07-21 18:43:28 +03:00
Matt Ellis
b284deb1b7 Extract some state and accessors out of text field
Encapsulate text field a little better
2025-07-21 18:43:28 +03:00
Matt Ellis
56e6ecca89 Update history command and add tests 2025-07-21 18:43:28 +03:00
Matt Ellis
055a3bc910 Remove deprecated and unused history related code 2025-07-21 18:43:28 +03:00