![]() ![]() There are also times when the macro works on blocks of text, but there are occasional line breaks that would break the macro, and repeating until I get to a line break, skipping it, and then proceeding is easy. I don't get the "repeat count" functionality that I know comes for free in vim, but at the same time, I rarely know HOW many lines I need to apply a macro to, and so just letting key-repeat take over until I'm almost done works for me. I just did it now in about 20 seconds, just as a proof of concept. I can do that pretty trivially in any of three editors as well. For me it comes down to the fact that saving the 5 minutes to set up that script, once a year when I need something that complicated, would take a crazy long time to amortize over the three years it would take me to become that good at vim. But that's an extremely rare operation for me. More complex (or numerous) transforms just become a script that I run on the file. Not quite as nice, because I have to keep hitting the "play macro" key, but gets me 95% of the way there. But when I want to do something like that, I create a regex search that matches what I want and then record a macro that includes the "search next" key. Notepad++ and Slickedit both offer you the option of binding the macro to a key more permanently too.Īs I mention in this other comment, vim and Emacs hardly have a corner on the macro market. In all three editors, I can just record, hit keys, stop, and playback (as many times as I hit the key). I typically map them to ctrl-f11 (record/stop recording) and ctrl-f12 (playback). I use Visual Slickedit, Notepad++, and Visual Studio macros frequently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |