Thursday, June 20, 2013

append to non-blank lines in a selection

Given a text:

line1 has stuff
so does line 2

line 4 has more stuff
and line 5
and so on

I would like to select the text block and append a word to each
non-blank line. I can use a block selection and `A` to add to all
selected lines, but not sure how to only apply to lines that have
text.

PS I'm guessing I need to learn regular expressions, which confound me
to no end. Any pointers to good places to learn regex would be great!

c
--
Chris Lott <chris@chrislott.org>

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment