More vim fun...
Posted Tue, 08 Jul 2003
the ! command is awesome. It lets you filter a given number of lines (or characters) through an external program. Here's an example: Let's say we have a file that has blank lines on it and we want to remove those blank lines? Here's what the file I made looks like:
So, we want those blank lines gone, right? We can use the ! command with grep to do that! Type this:
!Ggrep -v '^$'
Now we're set, the result should look like this:
Hello there How are you Plz kthx? |
!Ggrep -v '^$'
Now we're set, the result should look like this:
Hello there How are you Plz kthx? |