reverse.vim : reverse (1st line becomes last ...) the lines in a file
script karma |
Rating 2/11,
Downloaded by 630 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Amit Jain |
|
script type |
utility |
|
description |
This file has a vim script to reverse the lines in the file.
(line 1 swapped with last line say 5, line 2 swapped with line4 ...)
I build it because I had such a requirement and could not
think of anything quicker on Windows.
Unix people have lot better tricks-).
How to use :
Method 1: press <F2> if you wanna reverse all the lines
Method 2: select lines in visual mode and press <F2>
if you wanna swap only the highlighted lines
Method 3: To reverse line1 to line2 use :line1,line2 Reverse
|
|
install details |
simply source the file using
:source <filepath>\\reverse.vim
or source it in your vimrc file
for automatically sourcing this everytime
Caution: This script maps <F2> key, so if you have already mapped <F2>
key you should change the mapping in this file to some other key
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.226.169.94
|