How do you record a macro to delete all blank lines in Vim?
Answer
qa/^$/\ndd@aq
Explanation
Record a macro that searches for blank lines, deletes them, and recurses. This processes the entire file automatically.
qa/^$/\ndd@aq
Record a macro that searches for blank lines, deletes them, and recurses. This processes the entire file automatically.