Sublime Forum

How to Record a Macro that uses the Replace... function

#1

I’m trying to record a macro that involves using the Replace… function to highlight certain values and then Cut and Paste those to the top of the document. Is this possible with Sublime text?

I made a simple macro trying to do exactly this and here’s how it came out.

[
	{
		"args": null,
		"command": "cut"
	},
	{
		"args": null,
		"command": "paste"
	}
]

Looks like it only recorded the copy and paste actions.

0 Likes

#2

I assumed this wouldn’t be too difficult to do but… 80 views and no replies.

Any suggestions for a program similar to Sublime Text that CAN do this?

0 Likes

#3

someone else reported the same thing a while back:

build 4075 added support for finding text, and this seems to kinda work - it records "command": "find_next". For replacing text, I guess you would need to open the ST console, enable command logging (sublime.log_commands(True) Enter), perform your replacements, then copy the commands from the console into a macro file.

0 Likes