What does cpoptions setting 'o' does?

The doc :h cpo-o reads

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


Assuming you have the following text:

Test Case

Test Case

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.

  • @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.