Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incremental search in IdeaVim

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?

like image 734
woodings Avatar asked Dec 07 '14 04:12

woodings


3 Answers

Just put set incsearch into your ~/.ideavimrc

like image 143
Oleg O Avatar answered Nov 03 '22 00:11

Oleg O


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

like image 26
Sharanabasappa Revadigar Avatar answered Nov 02 '22 23:11

Sharanabasappa Revadigar


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.

like image 1
jbyler Avatar answered Nov 03 '22 00:11

jbyler