Is it possible to reuse the range of ex commands in VIM?
As an example, I can write (copy) lines 4 to 10 from my current file to a new file using the following command:
:4,10w foo/bar.txt
But what I really want to do is move the lines to a new file. I can do this like so:
:4,10w foo/bar.txt
:4,10d
But it's a bit annoying to have to type 4,10 both times.
So I have two questions:
- Generally, Is there a way to reference the previously used range in ex commands?
- Specifically, if there is not a way to do (1), is there any easier way to cut and paste a number of lines from one file into a new one.