tag:blogger.com,1999:blog-6637736252081011583.post1412516715243746034..comments2023-10-23T11:13:47.199-07:00Comments on Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Remove Empty LinesTravis Whittonhttp://www.blogger.com/profile/14592647486468034166noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6637736252081011583.post-34525403076558293312009-01-30T10:01:00.000-08:002009-01-30T10:01:00.000-08:00Really a nice blog, so much tips about vim, great,...Really a nice blog, so much tips about vim, great, thanks.<BR/><BR/>Outside vim:<BR/><BR/>$ grep -v '^$' file<BR/>$ grep '.' file<BR/>$ sed '/^$/d' file<BR/>$ sed -n '/^$/!p' file<BR/>$ awk NF file<BR/>$ awk '/./' file<BR/><BR/>http://unstableme.blogspot.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-78791224139226127772008-05-05T08:20:00.000-07:002008-05-05T08:20:00.000-07:00Wow, that's great! Glad you're enjoying the blog a...Wow, that's great! Glad you're enjoying the blog and thanks for the tip.Travis Whittonhttps://www.blogger.com/profile/14592647486468034166noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-46713091937579205742008-05-05T05:02:00.000-07:002008-05-05T05:02:00.000-07:00Hi !Your blog is very cool, it made me use H J K a...Hi !<BR/>Your blog is very cool, it made me use H J K and L keys rater than the arrow keys in vim ^^ !<BR/><BR/>To remove blank lines, you can also do<BR/>:%g/^$/d<BR/><BR/>Since sometimes, \n does not work (I saw that once on AIX with vi)...Anonymoushttps://www.blogger.com/profile/02780829884164015350noreply@blogger.com