Sunday, September 4, 2011

6. Delete columns in a file via vim editor

For instans in a special file, you have lots of data which have been sorted by columns like this:

1     2     3     4
5     6     7     8
9    10   11   12
13  14   15   16

Now, we want to keep first and second columns and delete the rest ones.
To do this
1. press Ctrl+v (virtual block mod)
2. press G (to go to the end of the file)
3. press d (to delete highlighted columns)

No comments:

Post a Comment