Sublime Text block/column copy/paste

One of the things I love about Vim is the visual block mode, especially column copy/paste.

I’ve been using Sublime for a while, and I always forget the easiest way to do this.
So now that I’ve got it figured out once more, I’m writing this so I don’t forget.

The general idea is this:

1. Copy a column of text. And remember how many lines are selected.
2. Create multiple cursors where you want to paste. (Has to be the exact same number of lines as #1.)
3. (If in vintage mode, go to ‘insert’ mode.)
4. Paste

However, I don’t want to count lines if I’m just going to paste somewhere else in the same set of lines.
So below is what works for me.

Caveat: I’m using Sublime 3, in vintage mode, on Windows 7. So your mileage may vary.

These steps are to do one thing fast, copy a column of text from anywhere to somewhere else in the same set of lines. Like perhaps the end of the line.

  1. Select the block of text to copy. (For me, this is with the middle mouse button) (mac: option+left mouse button)
  2. Copy with Edit->Copy, or Ctrl+C
  3. Yank, in vintage mode, this is ‘y’. This is unnecessary for the yank effect. The side effect, though is to un-select, and get back to multiple cursers.
  4. Now position the cursors where you want to paste. Vintage mode: 0 for beginning of line, $ for end of line.
  5. ‘i’ or ‘a’ to get into ‘insert’ mode.
  6. Paste. Edit->Paste, or Ctrl+V.

This works for me.
I’d like to know how to do it without the unnecessary ‘yank’.

If you like this…

Get notified of new posts, delivered to your inbox. No spam. Not very frequent.

Leave a Reply