1

What does cpoptions setting 'o' does?

The doc :h cpo-o reads

Line offset to search command is not remembered for next search.

1

Assuming you have the following text:

Test Case
First

Test Case
Second

and you search with /Case/+1 from the beginning of the file. The cursor will end up on the text First. You searched for Case and gave the "line offset" +1. (See :help search-offset)

If cpoptions does not contain o and you press n, the cursor ends up on the text Second.

If cpoptions does contain o and you press n and the cursor ends up on the text Case. So the line offset was not remembered.

1
  • @elig Could you accept this answer or is additional clarification needed?
    – Ralf
    Jan 11 '19 at 10:14

Your Answer

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

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