John
John

Reputation: 1039

In (neo)vim, how can I jump to the start or end of a text object?

I am familiar with how I can change, delete, yank etc inside or around various text objects.

I would like to jump to the start or end of the current sentence, or any other text object I currently in.

Is there some command to do this?

Upvotes: 1

Views: 856

Answers (1)

romainl
romainl

Reputation: 196536

There is no generic command for that.

That said, doing v<text-object><Esc> leaves the cursor at the end of the text object, and doing v<text-object>o<Esc> leaves the cursor at the start. vip<Esc> or vipo<Esc> are not so bad.

See :help v_o.

If you feel adventurous, you may consider using that base technique to build your own custom motions.

Upvotes: 2

Related Questions