For example, if I have four lines as follows:
the first line
the second line
the third line
the fourth line
I want to reverse them to
the fourth line
the third line
the second line
the first line
How could I do this in vim?
|
For example, if I have four lines as follows:
I want to reverse them to
How could I do this in vim? |
||||
|
|
|
To reverse all the lines in a file,
For an explanation see
which also shows how to reverse just a range of lines. |
|||
|
|
|
Select the desired lines, hit |
|||
|
|
(Based on: http://tech.groups.yahoo.com/group/vim/message/34305 ) |
||||
|
|