I have relativenumber
turned on and sometimes find it convenient to use ex copy/move/delete on certain lines. For instance, my cursor might be at the top of the screen and there are two lines I want to delete, but they're way down the page. So I run something like :+43,+44d
.
Unfortunately, this moves the cursor down 43 lines (along with deleting the specified lines), which means I have to waste keystrokes getting back where I started (with, e.g., 43gk
). I could set a mark before entering the initial command, but that ends up using just as many keystrokes. Is there some kind of flag that could be used to run the command without moving the cursor position, or some way to implement such as a mapping or function?