How to reverse line order in gVIM? GVIM regular expression to reverse the order of lines in any block of text in a file is shown below.
Command to reverse order in entire file or global operation.
Let’s discuss it with an example of block of text starting at line 10 and going till line 20 end.
:10,20g/^/ mo 10
The operation is simply carried by moving every line in text file before the first line in the block.
In the command above
:g stands for :global - the commands to executed globally
/^ stands to match beginning of any line.
/m stands for move in gvim