Monday, August 20, 2012

Help me understand @. macros

I'm a relatively new VIM user, and I've been playing vimgolf (www.vimgolf.com) to learn new skills. This challenge has a bizarre solution that I don't understand:
http://www.vimgolf.com/challenges/4d1db1b8de2f897c2a00014a

Here's the shortest solution posted:
a.<BS><CR><Esc>24@.ZZ

First off, I didn't realize @. was a valid macro combination. So, my questions:
1) Is @. any different than .? Why would I want to use one instead of the other?
2) What's going on with this solution? Why does it work but:
a<CR><Esc>24@.ZZ
doesn't work? What's so special about inserting the dot specifically?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: