1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2026-04-10 07:13:05 +02:00
Commit Graph

5711 Commits

Author SHA1 Message Date
94a7e1d303 Add 'isactionenabled' function 2026-04-09 21:16:06 +02:00
8636717dea Preserve visual mode after executing IDE action 2026-04-09 19:22:04 +02:00
22dfdd8ca6 Make g0/g^/g$ work with soft wraps 2026-04-09 19:22:03 +02:00
84c227122a Make search highlights temporary 2026-04-09 19:22:03 +02:00
1b9ff4c94a Do not switch to normal mode after inserting a live template 2026-04-09 19:22:03 +02:00
bdecbb5ef0 Exit insert mode after refactoring 2026-04-09 19:22:03 +02:00
7dfd8e6cff Add action to run last macro in all opened files 2026-04-09 19:22:03 +02:00
2aadbdc8f0 Revert per-caret registers 2026-04-09 19:22:03 +02:00
627d65e528 Apply scrolloff after executing native IDEA actions 2026-04-09 19:22:03 +02:00
e77871796e Automatically add unambiguous imports after running a macro 2026-04-09 19:22:03 +02:00
c6e993dcbd Fix(VIM-3986): Exception when pasting register contents containing new line 2026-04-09 19:22:03 +02:00
341ba1ba1f Fix(VIM-3179): Respect virtual space below editor (imperfectly) 2026-04-09 19:22:03 +02:00
5734a13ea0 Add support for count for visual and line motion surround 2026-04-09 19:22:02 +02:00
582e6bdcd8 Fix vim-surround not working with multiple cursors
Fixes multiple cursors with vim-surround commands `cs, ds, S` (but not `ys`).
2026-04-09 19:22:02 +02:00
7414c3d3ed Fix(VIM-696): Restore visual mode after undo/redo, and disable incompatible actions 2026-04-09 19:22:02 +02:00
aea54bdf81 Change matchit plugin to use HTML patterns in unrecognized files 2026-04-09 19:22:02 +02:00
79aca4497e Fix ex command panel causing Undock tool window to hide 2026-04-09 19:22:02 +02:00
50976ea9da Revert "VIM-4120 display multiple lines in OutputPanel with different styles"
This reverts commit 5e20bbf1
2026-04-09 19:22:02 +02:00
57d0ef1dd5 Reset insert mode when switching active editor 2026-04-06 20:42:59 +02:00
d2f017887f Remove notifications about configuration options 2026-04-06 20:42:59 +02:00
536942f514 Set custom plugin version 2026-04-06 20:42:59 +02:00
d85e7dba19 Fix pumvisible returning opposite result
The implementation was broken in ed50fa28f5, which inverted the result but did not invert the condition.
2026-04-03 12:17:47 +02:00
1grzyb1
a9c3277a51 Reset KeyHandler in rider esc lookup 2026-04-03 11:28:24 +02:00
1grzyb1
6e6039c22a Enable lookup listener only in rider/clion 2026-04-03 11:28:24 +02:00
1grzyb1
b49e896b41 Return VimCaret fields back to IjVimCaret
There was compatibility issue with multicursor due to change of return type
2026-04-03 11:14:54 +02:00
1grzyb1
122b066b75 Return KeyGroup from getKey
There was compatibility issue with multicursor due to change of return type
2026-04-03 11:14:54 +02:00
1grzyb1
cb24ac2bfa Restore public fields in IjVimEditor
Some fields where moved to factory and it resulted in compatybility issues with multicursor plugin
2026-04-03 11:14:54 +02:00
1grzyb1
b14324a3e6 Catching initialization exceptions
When external plugin couldn't be initilized and throw exception it resulted in broken ideavim state
2026-04-03 08:37:20 +02:00
1grzyb1
e40a839f52 Fix Escape not exiting insert mode after Ctrl+Space completion in Rider
Octopus is disabled for Rider (VIM-3815), and Rider's LookupSummaryInfo popup causes the popup manager to consume Escape before IdeaVim's action handlers can process it, so we now listen for explicit lookup cancellation via LookupListener to exit insert mode.
2026-04-02 12:27:25 +02:00
1grzyb1
a45cc0891b Don't extend octopus handler in VimEscForRiderHandler
Octopus is disabled for Rider so VimEscForRiderHandler couldn't properly handle esc
2026-04-02 11:02:08 +02:00
1grzyb1
89bad651c0 Add missing frontend module decriptor 2026-04-02 11:02:04 +02:00
1grzyb1
02130a87c9 Exit search with proper defocus and handle escape 2026-04-01 11:48:43 +02:00
1grzyb1
13fd228707 Fix TransactionTest project leak on CI
The mock services (VimMarkService, VimJumpService) were replaced via
MockTestCase.mockService() using @TestDisposable, which is disposed
AFTER @AfterEach. During super.tearDown(), editor disposal triggers
injector.markService.editorReleased(vimEditor), which still hits the
mock (service replacement not yet undone). This records a new Mockito
invocation on the EDT's MockingProgressImpl thread-local, holding
IjVimEditor → EditorImpl → ProjectImpl — causing the leaked project.

Fix: use a separate Disposable for service replacements and dispose it
before super.tearDown(), so editorReleased goes to the real service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:48:44 +01:00
1grzyb1
2b0485fb9c Fix flaky Transaction test 2026-03-24 11:09:16 +01:00
1grzyb1
65ae630623 Fix flaky Transaction test 2026-03-24 10:08:28 +01:00
1grzyb1
d0ad4caf76 Move dependency support to the plugin.xml file
Otherwise, exception thrown from `DependencySupportBean.setPluginDescriptor()`.
2026-03-24 09:13:42 +01:00
1grzyb1
35fe3f9cca VIM-2821 Undo for repeating insertText in split mode
Insert text wasn't being properly grouped into single undo group when performing `.`
Now whole `.` is grouped into single undo entry
2026-03-24 08:56:46 +01:00
Alex Plate
2b1bee3c9c Fix thinapi test compilation errors with runBlocking
After the K3 coroutine audit made VimApi methods suspend,
these tests were not updated to wrap calls in runBlocking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:54 +02:00
Alex Plate
609f9b9be8 Revert Exchange plugin migration to new VimApi
Part of the VimApi freeze decision (VIM-4161). Reverting the
partial migration to keep Exchange fully on the old API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:54 +02:00
Alex Plate
a81cfa67f0 Migrate Exchange highlight from RangeHighlighter to HighlightId
Replace RangeHighlighter field in Exchange with HighlightId. Use
injector.highlightingService for adding/removing highlights instead
of direct markupModel access. Update Util.clearExchange to take
VimEditor. Update test assertHighlighter to check markup model
directly (area validation lost — tracked with TODO).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:54 +02:00
Alex Plate
06d75c1170 Simplify highlight endAdj condition in Exchange
The old condition `!isVisualLine && (hlArea == EXACT_RANGE || isVisual)`
was equivalent to `ex.type != LINE_WISE` because when !isVisualLine is
true, hlArea is always EXACT_RANGE, making the isVisual branch
unreachable. Pure logic simplification, no behavior change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:54 +02:00
Alex Plate
65c5f5eadd Migrate all Exchange mappings to nmapPluginAction/xmapPluginAction
Replace separate nnoremap+nmap/putExtensionHandlerMapping+putKeyMappingIfMissing
with the combined nmapPluginAction/xmapPluginAction helpers for all four
mappings (cx, cxx, cxc, X). Remove ExchangeClearHandler and VExchangeHandler
classes; their logic is now in top-level bridge functions that still delegate
to the old Operator/Util code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:54 +02:00
Alex Plate
6c9f711b51 Refactor Exchange data class to use offsets and line/col instead of Mark
Preparation for new API migration: Exchange now stores startLine/startCol/
startOffset/endLine/endCol/endOffset directly, removing dependency on the
internal Mark type. All comparison and cursor logic updated accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:53 +02:00
Alex Plate
6613a3284c Migrate Exchange N-mode handler (cx, cxx) to new VimApi
Replace ExchangeHandler class with suspend fun VimApi.exchangeAction()
and register via initApi.mappings { nnoremap/nmap }.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:53 +02:00
Alex Plate
9d35c748c2 Switch Exchange extension to init(initApi: VimInitApi) signature
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:53 +02:00
Alex Plate
f0c9c6d16b Reorganize VimApi into scopes with dual-access pattern
Move loose functions from VimApi into dedicated scope interfaces
(VariableScope, CommandScope, TabScope, StorageScope, TextScope)
and update existing scopes (mappings, textObjects, outputPanel,
digraph, commandLine) from default-empty-lambda to two-function
pattern: lambda `fun <T> scope(block: X.() -> T): T` plus
direct-object `fun scope(): X`.

VIM-4158

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:53 +02:00
Alex Plate
70fce5ab2b Migrate Commentary N/X operator mappings to new API
Replace putExtensionHandlerMapping(MappingMode.NX, ..., CommentaryOperatorHandler)
with initApi.mappings { nnoremap/xnoremap("<Plug>Commentary") { ... } }.

Remove CommentaryOperatorHandler class (logic inlined into mapping lambdas).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:52 +02:00
Alex Plate
90c642ccfe Switch Commentary to init(initApi: VimInitApi) signature
No behavior change — just switches from the old init() to
init(initApi) so we can incrementally migrate to the new API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:52 +02:00
Alex Plate
7b99c43a98 K3-4+7: Make scope openers and flat VimApi methods suspend
Per VIM-4144 coroutine audit:
- Group 4: Scope-opening functions (editor, forEachEditor, commandLine,
  option, outputPanel, digraph, modalInput) become suspend with suspend
  block parameters
- Group 7: Flat VimApi methods (normal, execute, saveFile, closeFile,
  tab ops, data ops, pattern ops, camel ops) become suspend
- Excluded: properties (mode, tabCount, currentTabIndex), getVariable,
  setVariable, exportOperatorFunction per earlier decisions
- Updated VimApiImpl overrides accordingly
- Fixed extension code (argtextobj, miniai, paragraphmotion,
  replacewithregister, textobjindent) to propagate suspend through
  helper functions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:51 +02:00
Alex Plate
f7af2631e9 T010-T014: Remove mode-changing methods from VimApi, use normal() instead
Remove enterInsertMode(), enterNormalMode(), enterVisualMode() from VimApi.
Mode changes should use normal() — e.g., normal("<Esc>"), normal("i"),
normal("v") — matching how real Vim plugins handle mode transitions.

Neither Vim nor Neovim has a direct "set mode" API. All mode changes in
real plugins (surround, exchange, commentary, ReplaceWithRegister) use
normal!, feedkeys(), or :stopinsert. The removed methods used incomplete
internal delegation (changeMode Level 2) that skipped proper entry/exit
setup (marks, strokes, dot-repeat, document listeners).

Also removes the now-unused changeMode() function from Modes.kt.

See VIM-4143 for future proper mode-changing API design.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:31:50 +02:00