Sublime Forum

How to paste at cursor position after dd'ing in vintage?

#1

After dd ing a line in command mode in vintage I can either Paste above: P or Paste below: p but is there any way to paste at cursor?

0 Likes

#2

I don’t use Vintage, but in regular vim/vi I would accomplish this by using 0d$ (or just d$) to delete the text; then p will paste at the cursor location.

Essentially, in vi there are two kinds of register operations; character oriented and line oriented, and what the p commands do differs based on which kind of data it is.

dd deletes the whole line (and yy yanks the whole line), so that is what p pastes. Something like d$ (delete to end of line) or 0d$ (jump to start of line, delete to end of line) gets the line as a character register, so that’s what gets pasted.

I’m not sure how much that applies to Sublme’s vintage mode, though.

2 Likes

#3

totally works! Thanks @OdatNurd :slight_smile:

0 Likes