3 ms·
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 fi
by tmaly 2y 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
- btschaegg 2y agoTo 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.