Home Download Buy Blog Forum Support

Using 'find' in macros

Using 'find' in macros

Postby Kneehat on Tue Aug 11, 2009 8:44 pm

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:

Code: Select all
some:thing
some:thing
some:thing


start with the cursor at the top and press ctrl-q ctrl-f : <esc> <esc> . <home> <cursor-down> 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.
Kneehat
 
Posts: 17
Joined: Tue Aug 11, 2009 8:16 pm

Re: Using 'find' in macros

Postby EJ12N on Wed Aug 12, 2009 3:49 pm

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!
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Using 'find' in macros

Postby Kneehat on Wed Aug 12, 2009 6:21 pm

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 :)
Kneehat
 
Posts: 17
Joined: Tue Aug 11, 2009 8:16 pm

Re: Using 'find' in macros

Postby runnerxl on Sat Feb 25, 2012 7:36 am

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. :|
runnerxl
 
Posts: 1
Joined: Sat Feb 25, 2012 7:21 am

Re: Using 'find' in macros

Postby bernard on Thu Apr 19, 2012 7:43 am

Requests for ST are kept at userecho.
Add your vote for this feature here:
http://sublimetext.userecho.com/topic/7 ... -commands/
bernard
 
Posts: 1
Joined: Thu Mar 29, 2012 10:53 pm


Return to Technical Support

Who is online

Users browsing this forum: timadams, Yahoo [Bot] and 22 guests