Commit Graph
6245 Commits
Author SHA1 Message Date
chylex dd4cb0e736 Disable paragraph-motion plugin bindings for operator-pending mode 2026-10-15 08:54:29 +02:00
chylex fdcd20bc19 Fix editor jumping with large scrolloff 2026-10-14 20:47:01 +02:00
chylex 2f9a9a972a Make search highlights temporary 2026-10-14 20:47:01 +02:00
chylex c764f7455f Disable IdeaVim in popup editors 2026-10-14 20:47:01 +02:00
chylex 4a3c8b46a4 Fix AltGr not triggering Ctrl-Alt bindings on Windows 2026-10-14 20:47:00 +02:00
chylex 2ec581cdcf Add 'isinplacerenaming' function 2026-10-14 20:47:00 +02:00
chylex 0b4eecb284 Add 'isactionenabled' function 2026-10-14 20:47:00 +02:00
chylex 3c5a8760f4 Preserve visual mode after executing IDE action 2026-10-14 20:47:00 +02:00
chylex 7658d83564 Make g0/g^/g$ work with soft wraps 2026-10-14 20:47:00 +02:00
chylex 5eff0518f1 Do not switch to normal mode after inserting a live template 2026-10-14 17:37:22 +02:00
chylex f2fb835f87 Exit insert mode after refactoring 2026-10-14 17:37:22 +02:00
chylex 8c12c4a4fc Add action to run last macro in all opened files 2026-10-14 17:37:22 +02:00
chylex 08cf6701ed Fix losing yanked text when number of carets changes 2026-10-14 17:37:22 +02:00
chylex a62604111c Apply scrolloff after executing native IDEA actions 2026-10-14 17:37:22 +02:00
chylex 38b26df573 Automatically add unambiguous imports after running a macro 2026-10-14 17:37:22 +02:00
chylex 7d414beaa0 Fix(VIM-3986): Exception when pasting register contents containing new line 2026-10-14 17:37:22 +02:00
chylex 0fae2bec79 Fix(VIM-3179): Respect virtual space below editor (imperfectly) 2026-10-14 17:37:22 +02:00
chylex d57361ba0c Add support for count for visual and line motion surround 2026-10-14 17:37:22 +02:00
chylex 7437800180 Fix vim-surround not working with multiple cursors
Fixes multiple cursors with vim-surround commands `cs, ds, S` (but not `ys`).
2026-10-14 17:37:22 +02:00
chylex 54d4f03c95 Change matchit plugin to use HTML patterns in unrecognized files 2026-10-14 17:37:22 +02:00
chylex 7dbf4fe83a Fix ex command panel causing Undock tool window to hide 2026-10-14 17:37:21 +02:00
chylex ebafeac717 Reset insert mode when switching active editor 2026-10-14 17:37:21 +02:00
chylex 9b30fa67e2 Remove notifications about configuration options 2026-10-14 17:37:21 +02:00
chylex a71c8a319c Set custom plugin version 2026-10-14 17:37:21 +02:00
1grzyb1 b8f9ad7892 VIM-4228 Postpone caret movement after rider action 2026-10-14 16:28:42 +02:00
1grzyb1 713a61e362 Redraw panel only on current document changes
Without that even some random intelij change of gitignroe could redraw our panel what made Large file tests flaky
2026-10-14 11:50:01 +02:00
AndDe-gourav bb18bb5356 fix none selction on toggling visual form select mode on empty line and test for supporting selecting new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav 2201617e81 join tests and passes deleteJoinRange an exculsive range 2026-10-14 08:31:08 +02:00
AndDe-gourav fe78002de0 fixed caret resting on new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav 6cedadc455 vim-paragraph-motion test fix and other selection test fix 2026-10-14 08:31:08 +02:00
AndDe-gourav ee77c6de90 updated exchange test that include new line char
# Conflicts:
#	src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeExtensionTest.kt
#	src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt
2026-10-14 08:31:08 +02:00
AndDe-gourav 3fdb747969 remove todo comment of not selecting new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav f4272fe350 fix 'D' on empty(only new line char) visual line 2026-10-14 08:31:08 +02:00
AndDe-gourav 8b97cd8bed remove restriction not selecting new line char 2026-10-14 08:31:08 +02:00
1grzyb1 2d72b1f083 Restart clear output panel timer on change
Each n after search didn't restart timer so after 10s output panel was closed. It broke new Large file tests this way.
2026-10-13 15:41:38 +02:00
claude[bot]andClaude Opus 5.5 7cccaaa814 Support "?" as search history name in history functions
Vim's `:help hist-names` lists "?" alongside "/" as an alias for the
search history, but getTypeByString only recognised "/". As a result,
histadd('?', ...), histdel('?'), histget('?') and histnr('?') failed
instead of operating on the search history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:36:15 +02:00
1grzyb1 06778f5380 Generate ideavim_extensions.json only in root module 2026-10-13 12:16:43 +02:00
1grzyb1 738b73417f Load intellij.platform.rpc dependency from an optional module
intellij.platform.rpc doesn't exist in 2025.3, is embedded in the core
classloader in 2026.1-2026.2 and is a standalone module since 2026.3.
Declaring it as a dependency of the embedded ideavim-common module disables
the whole plugin on 2025.3 and breaks the 2025.3 build.

Move the dependency to a new optional ideavim-rpc module that provides
VimRemoteApiResolver via the IdeaVIM.remoteApiResolver extension point.
When the module is skipped (2025.3), fall back to calling
RemoteApiProviderService from the core classloader.
2026-10-13 12:16:43 +02:00
1grzyb1 bd0f361afa VIM-4341 Run search count on background thread
For large files running search count blocked edt which caused IDE freezes.
Now we first try to quickly show coutn and if we are not able in given threshold move it to other thread and later on update UI accordingly.
Additionally added tests for large files
2026-10-13 10:37:34 +02:00
1grzyb1 9e142d4401 VIM-1975 implement clever-f extension 2026-10-12 12:06:01 +02:00
grzybek 55549efd72 Remove in in notification massage 2026-10-12 08:55:50 +02:00
claude[bot]andClaude Opus 5.5 644f9cf628 Fix: IndexOutOfBoundsException on % in an empty document
findMatchingPairOnCurrentLine read the character at the caret offset
without checking that the current line has any characters. On an empty
document this indexed past the end of the text. An empty line has no
pair characters to match, so return no match there, as Vim does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 12:30:02 +02:00
claude[bot]andClaude Opus 5 1e46befc77 Keep replaceText character-wise for partial line ranges
determineSelectionType classified every range spanning more than one line as
line-wise. replaceText then built a line-wise VimSelection from it, which
expands to whole lines, so the text before startOffset on the first line and
after endOffset on the last one was silently discarded.

    // "one two three\nfour five six\nseven eight"
    replaceText(8, 18, "XXX")   // "three\nfour"
    // was:      "XXX\nseven eight"
    // expected: "one two XXX five six\nseven eight"

A multi-line range is now line-wise only when it actually covers those lines
completely, which is what ReplaceWithRegister's `2grr` needs; anything that
starts or ends mid-line stays character-wise and replaces exactly the
requested range.

This also drops the `isLine` check that the old code computed but could never
observe as true: it required the range to end with a line break while start
and end sat on the same line, and it was only consulted on the
startLine == endLine branch, where that cannot hold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 12:18:29 +02:00
claude[bot]andClaude Opus 5 3058a337d4 Honour allowEnd in CaretTransaction's getLineEndOffset
CaretTransactionImpl declared its own getLineStartOffset, getLineEndOffset
and getLine, duplicating the implementations it already inherits through
`EditorAccessor by EditorAccessorImpl(projectId)`. The copies had drifted:
getLineEndOffset dropped the allowEnd argument and always called the
single-argument VimEditor.getLineEndOffset, so it behaved as allowEnd = true
regardless of what the caller asked for.

The visible effect is that the same EditorAccessor function disagrees with
itself depending on how deeply it is nested:

    change {
      getLineEndOffset(line, allowEnd = false)                  // last character
      withPrimaryCaret { getLineEndOffset(line, allowEnd = false) }  // line break
    }

ReadScopeImpl and TransactionImpl both rely on the delegate, so dropping the
three redundant overrides fixes the argument handling and removes the
duplication that let them drift apart in the first place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 12:18:29 +02:00
IdeaVim Bot 1d34cc3206 Update help file 2026-10-09 09:43:09 +00:00
claude[bot]andClaude Opus 5 f90bc0bca6 Fix: cmdwin editor was never Vim initialised, so its buffer local options were missing
`isCommandHistoryWindow` used `Editor.getVirtualFile()`, which is not necessarily
populated while the editor is still being created - and that is exactly when it is
called, from `isAllowedFileEditor` via `vimDisabled`, to decide whether an editor
should be initialised. The command-line window opened by `q:`, `q/` and `q?` was
therefore classified as a non-Vim editor and `EditorListeners.add` never ran, so its
buffer never got its local option values.

Search count and search highlights are computed for the selected editor and for every
open editor, so searching for a pattern containing `\<` asked the cmdwin buffer for its
local 'iskeyword' and threw "Unexpected uninitialised buffer local value: iskeyword".

Resolve the file from the document instead, as every other check in `EditorHelper`
already does.

Found by the RandomActionsPropertyTest property tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 11:40:31 +02:00
claude[bot]andClaude Opus 5 f686ed5911 Add tests for exclusive and inclusive slice end indices
`SliceFunctionTest` covered negative and out-of-range end indices, but
not an end index that resolves to zero, which is the boundary where the
exclusive end index of `slice()` and the inclusive end index of a sublist
expression disagree. Verified against the previous implementation: the
`end index of zero` cases fail (returning the whole collection), and the
negative cases that resolve to zero or below already passed.

Also pin the sublist side of that boundary: an explicit `-1` end index,
`-length` (first item only), and `-length - 1` (empty). These passed
before, and guard the shared `VimList.slice`/`VimString.substring`
against a regression in the other direction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 10:46:17 +02:00
claude[bot]andClaude Opus 5.5 1a2cc3c401 Fix :tags failing when the line jumped from was deleted
Tag stack entries keep the line number they were recorded with and are not
adjusted on edits. When that line no longer exists, :tags called
getLineText() with an out-of-range line and failed with
"Incorrect line: N, out of M". Show empty text for such entries instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 10:40:55 +02:00
claude[bot]andClaude Opus 5.5 5e6c95c187 Fix: crash on empty search range such as :/ or :?
A search range consisting of a single delimiter made SearchAddress call
substring(1, 0), throwing StringIndexOutOfBoundsException. An empty
pattern now uses the last search pattern, as in Vim, and reports E35
when there is none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:39:32 +02:00
claude[bot]andClaude Opus 5.5 c78d2f326c Fix infinite loop on :continue inside :for over a List
In ForLoop (List iterable) and ForLoopWithList, the Continue branch used
Kotlin's `continue`, which jumped back to the `while` condition and
skipped `index += 1`. As a result `for x in [1, 2] | continue | endfor`
never terminated. Fall through to the increment instead.

Add regression tests for continue/break when iterating over lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:30:23 +02:00