Commit Graph
2222 Commits
Author SHA1 Message Date
chylex ed38927954 Make g0/g^/g$ work with soft wraps 2026-09-23 07:52:12 +02:00
chylex 2657d4fb38 Make gj/gk jump over soft wraps 2026-09-23 07:52:11 +02:00
chylex a7b8cc8a8d Make camelCase motions adjust based on direction of visual selection 2026-09-23 07:52:11 +02:00
chylex 9f601d7442 Stop macro execution after a failed search 2026-09-23 07:52:10 +02:00
chylex 1c51cf3457 Fix losing yanked text when number of carets changes 2026-09-23 07:52:10 +02:00
chylex 60c072f328 Update search register when using f/t 2026-09-12 23:22:07 +02:00
chylex b0178862c4 Add support for count for visual and line motion surround 2026-09-12 23:22:06 +02:00
chylex 2270b2f592 Fix(VIM-696): Restore visual mode after undo/redo, and disable incompatible actions 2026-09-12 23:22:06 +02:00
1grzyb1 4ab0520d9a VIM-2627 Configure ideavimrc path
Allow users to define custom locations of ideavimrc with path expansions and ij macros
2026-09-11 11:46:06 +02:00
1grzyb1 b796fcc08d VIM-4324 add close window command 2026-09-10 10:41:50 +02:00
1grzyb1 58969a50c2 VIM-2663 implement start replace command 2026-09-10 08:58:51 +02:00
1grzyb1 5a09332bf8 VIM-2663 implement start insert command 2026-09-10 08:58:51 +02:00
1grzyb1 9c052110f6 VIM-2478 add autoindent option 2026-09-09 18:41:37 +02:00
1grzyb1 dfee17471c VIM-2478 restore auto indent after actions 2026-09-09 18:41:37 +02:00
1grzyb1 ba6656d36b VIM-2089 block wise selection search 2026-09-08 12:26:39 +02:00
1grzyb1 ee899f6227 VIM-2089 Implement Visual Star Search extension 2026-09-08 12:26:39 +02:00
1grzyb1 fbb1836ddf VIM-2010 fix editor leak in tc tests 2026-09-08 08:56:02 +02:00
1grzyb1 7cd528013c VIM-4318 Restore selection with gv after sort
We were incoretlly restoring visual selection after sort command as updateMarksFromDelete/updateMarksFromInsert was updating last selection twice
2026-09-08 08:55:03 +02:00
1grzyb1 2d3a36d843 VIM-2010 fix repeat insert with import
Vim was recording strokes of adding import while insert
Also after lookup it first added java.util.List and after ther it simplified it to improt
2026-09-07 11:28:10 +02:00
1grzyb1 baef79a4b7 VIM-1974 implement textobj-line extension 2026-09-04 12:57:09 +02:00
1grzyb1 fafc5d25a4 Add idea prefix to custom options
To not confuse our internal options with vim ones we've added idea prefix to all of them
Old names will still work as deprecated names
2026-09-03 09:03:23 +02:00
claude[bot]andClaude Opus 5 05bcee8053 Fix: AssertionError when yanking with a blockwise-forced motion (y<C-V>)
`y<C-V>{motion}` (`:help o_CTRL-V`) makes `getMotionRange` return a
rectangular block, i.e. a multi-range `TextRange` with one range per row
of the block. `YankGroupBase.yankMotion` assumed a single range and
tripped `assert(motionRange.size() == 1)`; with assertions disabled it
silently yanked only the first row of the block, characterwise.

Handle a blockwise-forced motion the way the delete path already does:
store the whole multi-range as a blockwise yank and skip the
characterwise-to-linewise promotion, which does not apply to a block.

Found by the YankDeletePropertyTest property test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 10:47:20 +02:00
claude[bot]andClaude Opus 5 05d766b93f Fix: IndexOutOfBoundsException inserting the filename under the caret at the end of the document
`c_CTRL-R_CTRL-F` uses the *exclusive* end offset of the current incsearch
match as the document offset to look for a filename at. When the match ends
at the very end of the document, that offset equals the text length, and
`findFilenameAtOrFollowingCursor` indexed the text with it directly.

Guard against an offset that isn't a valid index into the text, and return
null, which reports E446 "No file name under cursor". This is the same guard
that `findWordAtOrFollowingCursor` already has, and it matches Vim, which
finds no identifier or filename when the position is past the end of the line.

Found by the property based tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 10:47:02 +02:00
1grzyb1andClaude Opus 5 22cbe0b1d0 VIM-4314 expand % in ex commands
Expand % signs also during command execution, not only with tab
completion.

% is the buffer name, relative while the file is under a content root;
only :p forces the full path. Expansion runs in a single forward pass
that honours \% and never rescans the expanded name, so a file name
containing % no longer loops forever. :! expands only the file-name
specials and leaves $VAR and ~ to the shell, as Vim does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 09:47:27 +02:00
1grzyb1 a8e199d868 VIM-4314 root and extension % completion 2026-09-01 09:47:27 +02:00
1grzyb1 b47d0b164f VIM-4314 tail % completion 2026-09-01 09:47:27 +02:00
1grzyb1 94c57f23cf VIM-4314 perse % arguments in completion 2026-09-01 09:47:27 +02:00
1grzyb1 74e65e9808 VIM-4314 Expand % in command completion to filename 2026-09-01 09:47:27 +02:00
AndDe-gourav 4e1fe04b4c fix range of visual selection 2026-08-31 10:01:42 +02:00
AndDe-gourav 3c7ad47005 fix for caret position after ChangeVisualCharacter 2026-08-28 08:29:24 +02:00
1grzyb1 5ee595aac4 VIM-3058 alternate file name register 2026-08-27 09:19:18 +02:00
1grzyb1 e0b9cb5def VIM-1370 Fix tag command to last position on stack 2026-08-26 11:01:35 +02:00
1grzyb1 e24188b427 VIM-1370 add tagstack option to disable tagstack 2026-08-26 11:01:35 +02:00
1grzyb1 f8ccadf5a1 VIM-1370 Implement tag command to push to tag stack 2026-08-26 11:01:35 +02:00
1grzyb1andCursor f6a4f77d12 VIM-1370 Implement pop command to pop from tag stack
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 11:01:35 +02:00
1grzyb1 29233c8e83 VIM-1370 Implement tags command to list tags 2026-08-26 11:01:35 +02:00
1grzyb1 ca33c221ce VIM-1370 Implement C-] go to declaration with tag stack 2026-08-26 11:01:35 +02:00
1grzyb1 d34b861aff VIM-1370 ctrl-t to pop from tag stack 2026-08-26 11:01:35 +02:00
1grzyb1 6ff778148c VIM-1347 Implement signature marks plugin
With this plugin local marks are also shown on toolbar
2026-08-25 11:36:19 +02:00
1grzyb1 7517930f48 VIM-4312 correct linewise delete promotion when range end has trailing non-whitespace 2026-08-24 11:03:19 +02:00
claude[bot]andClaude Opus 5 7b2c5e23a4 Remove shadowed offset parameter in InsertWordUnderCaretAction
`insertText` declared a local `offset` that shadowed its own `offset`
parameter, leaving the parameter unused and the body reaching for
`commandLine.caret.offset` instead. The two are the same value (that is what
the base class passes), so this is not a behaviour change — but the shadowing
hides the parameter and makes the function harder to read.

Name the local after what it holds, and use the parameter.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 15:33:46 +03:00
claude[bot]andClaude Opus 5 950d60fc63 Fix IndexOutOfBoundsException expanding a word object at the start of the file
`findPreviousWordOne` always steps back one character before it starts
skipping, to avoid getting stuck on the start of a word. When the caller
passes `allowMoveFromWordStart = false`, the character at the new position is
read to decide whether to skip at all — but if the search started at offset 0,
that position is -1 and the read throws.

The only caller that passes `allowMoveFromWordStart = false` is
`findWordObject` when expanding a right-to-left visual selection, so `viw`,
`vaw`, `viW` and `vaW` crashed whenever the selection reached the very start of
the file, e.g. `v h iw` with the caret on the second character.

Return 0 as soon as we step past the start of the text. Every path through the
rest of the function already returns 0 in that case, so this only affects the
out of bounds read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 15:33:46 +03:00
claude[bot]andClaude Opus 5 8c115d092f Report UTF-8 bytes from g8, as Vim does
`g8` is documented as printing "the hex values of the bytes used in the
character under the cursor, assuming it is in UTF-8 encoding". IdeaVim
printed the hex value of a single UTF-16 code unit instead, so anything
outside ASCII was wrong: `é` reported "e9" rather than "c3 a9", and a
character outside the BMP reported half of its surrogate pair ("d83d")
rather than its four UTF-8 bytes.

Encode the full code point at the caret to UTF-8 and format each byte as
two lowercase hex digits, space separated. ASCII output is unchanged.

Vim also appends the bytes of trailing composing characters, separated
by `+`. That is still not implemented, and is noted in the KDoc.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:38:19 +03:00
claude[bot]andClaude Opus 5 8a4ef315dc Fix g8 crashing when there is no character under the caret
`g8` read `editor.text()[caret.offset]` unguarded. On an empty file, or
with the caret on an empty last line, the offset is the end of the text
and the read threw IndexOutOfBoundsException.

Vim's cursor never sits on the line break - at the end of a line it sits
on the line's terminating NUL - so there is no character under it and
Vim reports "NUL". Do the same, which covers both the crashing offsets
and an empty line in the middle of the file (which previously reported
the hex value of the line feed, "a").

Adds FileGetHexActionTest, which had no coverage at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:38:19 +03:00
claude[bot]andClaude Opus 5 9f78d612f5 Fix(VIM-1341): gx should not add to the jump list
`gx` opens the URL under the caret with an external program and never moves
the caret - the existing `test gx opens the URL without moving the caret`
asserts exactly that. Saving a jump location was therefore pointless and
actively harmful:

- `addJump(reset = true)` pushed the *unchanged* caret position onto the jump
  list and reset the jump spot, so a `<C-O>` right after `gx` landed on the
  caret's own line instead of returning to the previous jump.
- `saveJumpLocation` also overwrites the `'` mark, breaking `''`.
- The action is a `ForEachCaret` handler, so both happened once per caret.

Vim does not list `gx` under `:help jump-motions`, and netrw's `gx`
implementation leaves the jump list alone.

Also drop the `FLAG_SAVE_JUMP` flag: it is only honoured by
`MotionActionHandler`, so on a `VimActionHandler` it was inert and misleading.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:16:16 +03:00
1grzyb1 08343eff68 VIM-4310 Don't show full parser error message 2026-08-21 09:30:56 +02:00
1grzyb1 b7219ff413 VIM-1266 file name from percent register
Implement % register that returns current file name
2026-08-21 08:49:52 +02:00
1grzyb1 c947c2d55f VIM-2168 inherit jumplist in every new window, keep focused list on collapse
A new window inherits the list of the window it was created from whichever buffer ends up in it, and copyJumps refreshes the recency order so that a closed window's list cannot win the one-list-per-project pick.
2026-08-19 13:30:24 +02:00
1grzyb1 7b9b921cbd VIM-2168 split mode tests for window jumps 2026-08-19 13:30:24 +02:00
1grzyb1 16e5a06979 VIM-2168 restore jumps saved from disk 2026-08-19 13:30:24 +02:00