Sublime Forum

How to copy from the mark to the selection?

#1

Edit - Mark - Delete to Mark will put the text between the current selection and the mark in the “yank” buffer and remove it from the buffer.

Is there a way to put the text between the cursor and the mark in the “yank” buffer, without deleting it?

A kind of copy rather than cut operation

0 Likes

#2

Does Edit > Mark < Yank do what you want?

0 Likes

#3

No, That inserts what was removed by Edit - Mark - Delete

0 Likes

#4

I have made a macro to do it:

[
	{
		"args": null,
		"command": "delete_to_mark"
	},
	{
		"args": null,
		"command": "yank"
	}
]

It works, but unfortunately also makes an unmodified file, modified/dirty.
Anyway to avoid that?

0 Likes

#5

You could try throwing an undo in there and see what that does.

0 Likes