16

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?

Peter Rincker
  • 43,539
  • 9
  • 74
  • 101
woodings
  • 7,503
  • 5
  • 34
  • 52
  • 1
    Good news! This is now fixed, as of ideavim 0.45. Just `set incsearch` in your .ideavimrc and you'll be up and running. – yshavit Jul 15 '16 at 17:41

4 Answers4

14

Just put set incsearch into your ~/.ideavimrc

Oleg O
  • 141
  • 1
  • 2
3

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).

bish
  • 3,381
  • 9
  • 48
  • 69
1

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.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
jbyler
  • 7,200
  • 3
  • 34
  • 42
  • to clarify: It does open the "find" box, but it doesn't activate it, so you can't type anything – VitalyB Mar 08 '16 at 10:16
0

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

Hubert Maj
  • 11
  • 3
  • 2
    Please, enhance your answer by adding more info – ddb Jul 23 '16 at 08:22
  • Rather than use a link, please extract the important information and add it to your answer, along with the referencing link to the source. That way, if the source page disappears the important information is still available. Links rot then break, and when this one does your answer won't help much. – the Tin Man Aug 15 '16 at 22:30