Sublime Forum

Macros don't record Find/Replace?

#5

i believe its possible to set up commands instead of macros with this package

github.com/facelessuser/RegReplace

having said that - i’m a newb and cant get it to work, so if anyone knows of a step by step guide, or would care to jot them down, i’m all ears :smile:

Pete

1 Like

#6

Agree. Macros should be able to record everything. It allows for powerful iterative batch manipulation. Macros, regexes and repeat get very powerful when find/replace can be used in this way.

1 Like

#7

I just registered because I felt the need to +1 this as a feature request!
The ability to record replace in the macro is extremely useful, especially for those repetitive tasks we are often faced with. Being able to record a regular expression replacement is an excellent feature and one that I would use multiple times every day.

0 Likes

#8

This is really a big problem.

0 Likes

#9

I just had this very problem today. Unfortunately I assumed that it would work and recorded a really complex sequence of search and replace actions. Big disappointment to find that it does not work. It would be great to get this added. In the meantime I need to do the search and replace across multiple files in the CLI shell.

0 Likes

#10

I purchased a license lask week and i am disappointed so much by this ‘feature’. :cry: I agree that macros should be able to record everything. Many editors or IDE can do this. I hope it will be implemented soon…

0 Likes

#11

Macros are very helpful when you have to run a large formulae on a daily basis. I used to work with a technical support team where we had to depend excel. To pull out the records, we always depend on Macros, even though it has some limits.

0 Likes

#12

I agree, extremely disappointing. This is the only editor I’ve seen that has macros where macros don’t record searches.

Just take the simple and common task of deleting everything in a line past the first comma. Easy in any other editor… Impossible in sublime.

I’m upset that I bought a licence.

1 Like

#13

I’d just like to add my voice here.

I like everything else about ST, the look, the feel, the use of jsonish config and python everywhere, however I noticed this not after a year, but after an hour or two.

I keep it installed because I want to like it and use this marvellous editor, but so far every Sublime Text switch in the last few years I guess? has been ended by having to switch to something else for heavy lifting. I want to invest time and money into using it and recommend it, indeed if this were a less obstructive niggle I would get work done in it anyway and possibly fix it myself in my spare time, but if I have to have emacs or textmate on hand to get work done, it’s not a software I can properly switch to.

Anyway, I guess other people’s mileage may vary and I’m only one person, but this issue is a big deal to me.

0 Likes

#14

found this while trying to work around lack of automatic regex escape in find; nothing more disappointing than disappointment during attempted workaround

0 Likes

#15

Gentle bump. Like so many I’d dearly love to see Macros get some love by recording everything, notably find & replace.

Pretty pls!

0 Likes

#16

Bump! Even Notepad ++ has regex macro support.

0 Likes

#17

As of June 12, 2016, Sublime Text macros still can’t handle find/replace? Is anyone home?

0 Likes

#18

This is also still high on my list of requests for Sublime. Classic editors like VIM, Brief/Crisp and Emacs all support this, allowing for powerful compound workflows to be recorded/built in macros involving find & replace, cursor moves and edits, which can then be repeated within and across files. This, together with large file / long line handling, are the only reasons I still find myself routinely firing up another editor.

Vote this up by liking the OP at the top!

0 Likes

#19

It’s 8:51AM now and still! Gasp!

… but honestly, I think the “shock” of the lack of this feature quickly diminished and caused me to just not use macros. They were more useful in Textmate 1 when we didn’t have multiple cursors and Emmet.

I also took the lack of the feature as an opportunity to hone my regex skills.

0 Likes

#20

I’ve been using ST for years and never had cause to use a macro…

0 Likes

#21

Agreed. I used to use them all the time in TM1, but don’t even think about them in ST3.

They are handy for quickly cleaning up pasted in code or markup that require a lot of manual cursor movement, but this is something I do very infrequently, and multiple cursors + regex find/replace have been a more-than-suitable replacement.

2 Likes

#22

Who currently is in charge of Sublime Text development? Is there a single person?

How do feature requests get prioritized?

0 Likes

#23

The author and owner of Sublime Text is @jps (Jon Skinner). @wbond (Will Bond), long-time Sublime community member, plugin developer and author of Package Control, is now working with Jon and is officially on-board at Sublime HQ. Major development priorities are, so far as I am aware, set by Jon although Will seems to be actively involved in Sublime’s development as well.

Traditionally Jon has been tight-lipped about Sublime’s roadmap and development has happened in fits and starts. With Will coming on-board, it seems that development efforts are ramping up again and I get the sense that this (new) forum will play a reasonably major part in defining priorities for Will and Jon.

nb. The above are opinions only. I don’t work for Sublime but have been an active part of the community since ST2, and an interested onlooker from some time before that :wink:

0 Likes

#24

Back on-topic :wink: I think @natebeaty sums it up nicely, but for power users some editing tasks require the flexibility to define a regex search as part of a compound, possibly repetitive, operation across a large file. I could give examples, but those who’ve requested this and chimed in on this subject know where I’m coming from. Most of them I would assume - and myself included - come from traditional power-user text editors like Emacs and VI. I myself came originally from Brief, via Crisp, Vim and Emacs.

Macros that can record and script anything the editor can do are crucial and having a macro system that can script many things (ie. TextCommands) but not all editor operations which can affect the buffer or view is both confusing and frustrating. As a result, like @natebeaty I just avoid using macros for anything but the most trivial caret and text manipulation convenience functions.

In Crisp, I would routinely record a macro that would find a regex, then move the cursor from the found string, do some edits, go down and to the beginning of the next line. I’d then hit F8 (playback macro) multiple times to perform the same operation on repeat across the file. Or I could hit Ctrl+Y (repeat), then type 20 and hit F8, which would repeat the macro playback 20 times. Or I could hit Ctrl+Y+0 (repeat to EOF) and hit F8, which would repeat the macro playback until the Find operation would cause a wrap. You get the idea.

In truth, I would use Replace rarely in this context, but Find often. For the above workflow, Sublime misses the ability to record & script Find/Replace, but also a ‘repeat’ function. For simpler operations, I’ve found ways of getting to the same place with multi-cursors, but it’s slow, more restrictive and inappropriate with particularly large files. You want see whats being changed linearly and in a stepwise fashion. You want to ‘pause and resume’ as you go, making other edits in-between. I don’t argue this as an alternative to multi-cursors, which are awesome, but they’re not suitable in every situation.

One improvement that could help a lot is the ability to define a regex match parameter for Ctrl+D style matching. Find & Replace allows find next and highlight all, but not selective highlighting. It still means we’re in multi-cursor land (with the same disadvantages outlined above) but it would get me closer to solving many of the situations where I’d be having to fire up another editor.

It’s probably fair to say that I would use this sort of thing rarely when purely coding, but often when doing transformations of large text files laid out in a particular way, like SQL dumps, tabulated text and CSV files. The ability to compound editing procedures into macros and play them back or repeat them is still essential for at least a part of my text-editing life I’m afraid, and feels like a real weakness of Sublime.

3 Likes

SublimeText macros are no good