Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do a lot of work on multiple rows/sections/blocks of similar data. My workflow usually goes like this...

1. Do the same thing 3 times, realize that I'll be done faster if I automate it. 2. qz to record a macro into buffer z. 3. Do the work, taking care to leave myself in a state where the next invocation of the macro will pick up right where I want it to. 4. q to finish recording. 5. :map <M-f12> @z to execute buffer z 6. Hit Alt-f12 over and over until I'm done.

Seems like a lot of steps, but it has saved me tons of time.

Of course, as the other commenter said, some folks don't use the feature. That's ok. There's room for all kinds :)



> 5. :map <M-f12> @z to execute buffer z 6. Hit Alt-f12 over and over until I'm done

Why map? @z and @@ till your are done? Or if you have this in your vimrc:

      vnoremap @@ :normal! @@<CR>
@z, visual select, and @@.


20@z repeats your macro 20times.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: