Incremental search in IdeaVim

5.2k Views Asked by At

With incsearch enabled in Vim, the cursor moves to the next match as I type the first character. IdeaVim doesn't seem to respect this setting. How should I turn on incremental search in IDEA?

4

There are 4 best solutions below

1
On

Here's one way: IDEA's normal search is incremental, so you could use that one via CMD-F or its equivalent. You could even bind / to invoke IDEA's find command instead of the VIM version if you want:

nmap / :action Find<CR>
nmap n :action FindNext<CR>

in your ~/.ideavimrc or invoked at the : prompt. There may be side effects to doing it this way; I haven't tested it extensively.

0
On

The suggestion actually doesn't work (it in fact has a lot of side effects). The best solution I have found so far is to simply use the built-in key combinations (Cmd+F, Enter or Shift + Enter).

2
On

According to IdeaVim 0.46 Notes, there is support for incsearch option for showing search results while typing.

1
On

Just put set incsearch into your ~/.ideavimrc