1

I recently upgraded vim for the first time in 5 years. Now, when I type in a search expression, the cursor in the buffer changes position with each key stroke to highlight a potential match. I want to disable this because it prevents me from using <Ctrl-r><Ctrl-w> to yank in the word where I positioned the cursor just before beginning a search.

What is the option for disabling the movement of the cursor when typing in a search expression?

2
  • are you not using a .vimrc file? Than Vim would start reading the defaults.vim (:h defaults.vim, for how to disable loading it). Otherwise, Vim shouldn't mysteriously have set it, if it didn't do it before May 8, 2020 at 5:58
  • I'm reading my own vimrc file, the result of decades of evolution. It's the same vimrc file as before I upgraded vim. I don't set incsearch or is in it. But there have been many changes since the upgrade. I haven't tracked them all down. For example, I find that now I have to explicitly set scrolloff to zero, which used to be default. Also had to track down how to avoid automatic indentations that are specific to the source code language of the file being editted. The incsearch option is just one of many things that seem to have different defaults. May 8, 2020 at 13:58

1 Answer 1

2

I finally found the right search phrase. Hoping that this will save someone an afternoon:

From reddit, the option is incsearch. To disable it, I do :set noincsearch.

2
  • Or, more precisely, set noincsearch to disable it, right?
    – filbranden
    May 8, 2020 at 2:12
  • 1
    Yes! Thanks for prompting me to clarify that. May 8, 2020 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.