Monday, February 28, 2011

Editing contents of a register?

Suppose that I have a collection of editing commands such as
%g/pattern_a/
%g/pattern_b/
%g/pattern_c/
........................
that find and list all the lines of a file that satisfy some patterns.
After I visually inspect a given list of lines, I may want to delete them.

I have thought to do this as follows:
-- yank a list command into a register "ayy
-- execute the command :@a"
-- inspect the lines as they are listed

Then if I'd now like to delete this set of lines, I'd like to append a d
to the contents of register a changing it from a list to a delete command,
and execute the command.

So how do I _easily_ modify, edit, the contents of a register?

I'd like something simpler than loading a list command into the clipboard
via highlighting and ^C followed by :^V and if choosing to delete
then :^Vd ???
--
Rostyk

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