I want to create a basic Vim script that simply deletes n lines, skips 1 line and repeats until the end of the document. I don't care about specific matches, I just want to delete the line. For example;
So I want to repeat the command 3ddj
for the entire document.
Text I want to keep.
Text I want to delete.
Text I want to delete.
Text I want to delete.
Text I want to keep.
Text I want to delete.
Text I want to delete.
Text I want to delete.
Text I want to keep.
Text I want to delete.
Text I want to delete.
Text I want to delete.
So it looks like...
Text I want to keep.
Text I want to keep.
Text I want to keep.
Thank you.
regular-expression
on your question, but the question does not seem to specify a reason to do this with regular expressions. If you are actually looking for something that does use regular expressions, stackoverflow.com/questions/17735289/… may be of interest. That question was about Notepad++, but the answer uses nothing but a pcre regex. (Disclaimer: I wrote that answer.)