Sublime Forum

Using 'find' in macros


Firstly, apologies if this has been discussed before but when I search on your forum for ‘macro find’ or permutations thereof, it tells me that the word ’ macro’ is too common so cannot be searched for. Slightly odd.

Anyway, I’m not sure if this is intended or a bug but using ‘find’ whilst recording a keystroke macro doesn’t work as expected.

For example, take a file with the following contents:

some:thing some:thing some:thing

start with the cursor at the top and press ctrl-q ctrl-f : . ctrl-q then I would expect that pressing ctrl-shift-q twice would result in each colon being replaced by a period but it appears that the find element is not recorded.

Now, I know this is a trivial example and could be achieved with other means like a regex but there are times when it is a lot quicker and easier to do it this way such as doing this replacement on every alternate line.



I too would like this feature, so when we record a macro find &replace] actions are recorded as well.
For now the only possibility writing a plugin for it. if you do the same find&replace a lot. but it would be cool to have a macro that just does that, since it would be easier for users to create them. I think this feature would be [ab]used a lot!



Yeah, I’d certainly use it a lot but unfortunately, my uses are almost always so quick and on-off that it’d be quicker making the changes manually than writing a plugin :smile:



This feature ‘find within macros’ is still not there (Sublime Text 2 beta build 2181), so is there any plan to implement this. I think, for useful editors EACH keystroke should recoded and played back. Right now, because I’am switching from Windows to OS X, I searching for a useful editor for OS X. My first choice is Sublime Text 2, but without this feature it will be Textmate. :neutral_face:



Requests for ST are kept at userecho.
Add your vote for this feature here: … -commands/