Tuesday, October 26, 2010

Copying and replacing chars of a line through a regex

So, I have this line:
:9g/\w/t.|s/./=/g

This copies all chars on line 9, paste them to line 10 and replace
each of chars on line
10 by = so that a line like:

Hello, Vim!
would become

Hello, Vim!
=========

However, I don't understand where in that regex line it is implied to
paste line 9 to line 10.
Moreover, what if I wanted to make it paste above (in line 8)?

--
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:

Post a Comment