tag:blogger.com,1999:blog-6637736252081011583.post4339311603632896387..comments2023-10-23T11:13:47.199-07:00Comments on Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Recursive MacrosTravis Whittonhttp://www.blogger.com/profile/14592647486468034166noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6637736252081011583.post-32625496681132276792010-03-02T12:03:51.046-08:002010-03-02T12:03:51.046-08:00Thanks for the tip!
If you're using the yankr...Thanks for the tip!<br /><br />If you're using the yankring plugin, it will query the user for the register name each time. I need to see if there's a way to silence this for macros.Tim Dhttps://www.blogger.com/profile/11427761577152820243noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-32064980827557927552009-06-24T01:50:37.244-07:002009-06-24T01:50:37.244-07:00Any idea how to add a recursive macro into the ~/....Any idea how to add a recursive macro into the ~/.vimrc file (as a hotkey)? I tried "nmap <leader>ni qa<C-a>j@aq" but for some reason it interprets the "@a" incorrectly and leaves the macro open (the second "q" does not get caught). I tried nnoremap, but that doesn't work either. I don't want to use a macro storage plugin because that's overkill.<br /><br />Is this a vim bug? I'm using vim version 7.2.65Linushttps://www.blogger.com/profile/15035711470500553142noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-2476999233910211432009-06-18T18:39:17.952-07:002009-06-18T18:39:17.952-07:00Interesting, I didn't know that.
Thank you, Ch...Interesting, I didn't know that.<br />Thank you, ChristopherUnknownhttps://www.blogger.com/profile/11220054372134206361noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-73731183107578419922009-06-18T16:40:13.467-07:002009-06-18T16:40:13.467-07:00@igor vim macros will die if any of their actions ...@igor vim macros will die if any of their actions fail -- for example, searching for a term which does not appear in the current buffer. Thus, for the post example, when the cursor can no longer go to the next char or the next line (whichever it was...), the macro will fail and the recursion will end.Anonymoushttps://www.blogger.com/profile/04871226658814740333noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-41241736309672930542009-06-14T06:02:59.921-07:002009-06-14T06:02:59.921-07:00Being recursive with no stop condition, I'd gu...Being recursive with no stop condition, I'd guess it would just continue to run ad infinitum, but vim seems to understand this and somehow halts the loop.Unknownhttps://www.blogger.com/profile/11220054372134206361noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-56646907127433054172009-06-13T03:33:55.995-07:002009-06-13T03:33:55.995-07:00haha cool, great tip thanks. I can't see any u...haha cool, great tip thanks. I can't see any use for it at the moment except for how you used it to process a whole file. But fun tip.David Thttps://www.blogger.com/profile/10326881023812933317noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-18414114585379921152009-06-12T08:00:39.234-07:002009-06-12T08:00:39.234-07:00took me a while to get my head around that. not su...took me a while to get my head around that. not sure if i'll ever use it, but nice to know. cheersUnknownhttps://www.blogger.com/profile/04727552481231896663noreply@blogger.com