Back to Ideavim

What's New in IdeaVim __VERSION__

src/main/resources/whatsnew-tbr.html

2.43.02.4 KB
Original Source

ideavim — whats-new — 80×24

~ $ ideavim

Here's what landed in __VERSION__.

new plugin · text objects

textobj-user — build your own text objects

The bundled textobj-user extension lets you declare custom text objects straight from your ~/.ideavimrc — no plugin code required. Describe a pattern (or a head/tail delimiter pair) and the keys that select it, and IdeaVim wires up the matching i/a objects and motions for you.

Plug 'kana/vim-textobj-user'" a spec maps a name to a pattern and the keys that select itcall textobj#user#plugin('datetime', {
\'date': {
\'pattern':'\\<\d\d\d\d-\d\d-\d\d\\>',
\'select': ['ad','id'],
\ },
\ })" now 'dad' deletes a date like 2013-03-16, and 'cid' changes it

Objects support select-a/select-i, next/previous motions, a charwise/linewise/blockwise region-type, and remappable <Plug> mappings.

operators · motions

Force a motion's shape mid-command

Slot v, V, or <C-V> between an operator and its motion to force the range's shape. v forces charwise and flips the motion's inclusive/exclusive nature, V forces linewise, and <C-V> forces blockwise.

dvw" charwise — includes the landing chardv$" charwise — leaves the last chardVe" linewise — deletes the whole lined\<C-V\>j" blockwise — deletes a vertical block

insert mode · completion

Line and file-path completion with CTRL-X

Vim's <C-X> completion submode arrives in Insert mode. Start it with <C-X>, then complete whole lines from the current buffer or file paths from disk.

\<C-X\>\<C-L\>" complete the current line from matching lines\<C-X\>\<C-F\>" complete a file path from the file system

also worth a look

Jump matches while searching

With incsearch on, press <C-G> to jump to the next match and <C-T> to the previous one — without leaving the / or ? prompt.

Your .ideavimrc, anywhere

Set the IDEA_VIM_CUSTOM_VIMRC environment variable to load your .ideavimrc from a custom path instead of the default locations.

polish & fixes

  • No more stray Visual mode after a refactor — with idearefactormode=keep, a rename (or similar action) no longer leaves you in Visual mode; the mode you were in beforehand is restored.
  • Trailing % respects your range — running a command on a Visual selection with a % appended (e.g. :'<,'>%d) no longer expands to the whole file; the % is now ignored, matching Vim.