In a script, I want to delete a rectangular block of text. For example, I want to convert this:
ABCD EFGH IJKL MNOP
ABCD EH IL MNOP
One way to do this is with visual block mode. Move the cursor to "F", enter visual block mode with Ctrl+V, move the cursor to "K", and press d.
However, this has the side effect of changing the value of the
'> marks. It there a way to avoid doing this? I want my Vimscript function to have as few side-effects as possible, other than deleting the desired text.
I wonder if there is a way to restore the
'> marks to the value they had before my function was called. Or, alternatively, if there is a way to delete a rectangular selection without entering visual-block mode in the first place.