Hacker News new | ask | show | jobs
by tmaly 470 days ago
sometimes when I copy data into a file, I get some blank lines depending on how the data was formatted. This can often happen when copying from websites.

I find this shortcut useful to delete all blank lines in a file

:g/^$/d

1 comments

To add to this, I would say :g in combination with :norm would be my choice.

Edit: Oh, also, since vim ships with xxd: xxd -r -p is a very useful thing to know.