[Gllug] Sorting Text in Vi

Stig Brautaset stigbrau at start.no
Tue Mar 12 17:23:32 UTC 2002


* Jackson, Harry <HJackson at colt-telecom.com> spake thus:
> Hi all
> 
> If I have a list of variables in a file that I am editing how can I sort it
> using Vi. I have done it today but everytime I try and do it again I find
> that I just move to the mark.
> 
> I thought I done this 
> 
> 'a!sort
> 
> or something similar but I have forgot can someone tell me what it was I
> done this is not on Vim.

:n,m!sort 

Should work, where n and m are the starting and ending linenumber
respectively. Normally, I just use "!}sort", or go to the starting
position, hit "v", go to the end position and type "!sort".

HTH.

Stig
-- 
brautaset.org

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list