skip to main
|
skip to sidebar
Tech Notes
Thursday, January 27, 2011
Delete blank lines in vim
Thanks to stackoverflow for this one.
:g/^$/d
will delete all blank lines in a file
Why? Because
:g
will execute a command on lines which match the regex and
:d
deletes :)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Labels
ubuntu
python
encryption
linux
vim
fstab
lvm
macbook
osx
postfix
postgres
ssd
truecrypt
Blog Archive
▼
2011
(11)
►
July
(1)
►
March
(2)
►
February
(2)
▼
January
(6)
Delete blank lines in vim
Put the results of a command in the current vim bu...
Update Ubuntu Release from the command line
Reset Moinmoin password
Postgres Recovery
Pretty Print XML in Python
►
2010
(4)
►
October
(1)
►
July
(1)
►
June
(1)
►
February
(1)
►
2009
(6)
►
October
(1)
►
September
(1)
►
June
(1)
►
May
(3)
No comments:
Post a Comment