[Gllug] Sorting Text in Vi

robin.c.smith at bt.com robin.c.smith at bt.com
Tue Mar 12 17:24:46 UTC 2002


You can run external commands on lines in a file

e.g. to sort all the file

:1,$!sort

or to do arithmetic on a line where the line is say:-

1024 * 1024

do :.,.!bc

etc

Robin

-----Original Message-----
From: Jackson, Harry [mailto:HJackson at colt-telecom.com]
Sent: 12 March 2002 17:11
To: 'gllug at linux.co.uk'
Subject: [Gllug] Sorting Text in Vi


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.


Regards;
Harry Jackson.


     


****************************************************************************
*********
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. 020 7390 3900

This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or 
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message.  Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
****************************************************************************
*********


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

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




More information about the GLLUG mailing list