I would like to have a selection that whose contents I replace with a command like r
, but the replaced text is added to a register.
The use case is editing a Markdown table in Vim, where I want to remove an entry and move it around. I would like to use vAwr_
(where the underscore is a space character) and then move to another cell to paste the result with e.g. R<C-r>"
I am hoping there is a built-in way to do this, but otherwise guidance on a new keybinding that performs the equivalent task would be helpful (perhaps modifying r
in visual mode so that it copies to a register before replacing.)
Another alternative is creating a new text-object to select between the |
symbols of the Markdown table, but I would rather solve this general problem first.