Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: