0

To reproduce this problem:

  1. Open a new vim window, input "abc", leave cursor at the end of line
  2. set hlsearch
  3. let @/ = "abc"
  4. The cursor doesn't point to the beginning of "abc"

When searching by /, the cursor always points to the match result when typing, how to do that with let @/ = ?

2
  • 2
    does pressing 'n' suffice?
    – Mass
    Jan 17 at 15:25
  • 3
    Changing @/ changes the search pattern. It doesn't search anything. Note. I'd say N instead of n. Jan 17 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.