Nice vi Trick
Bill Campbell
linux-sxs
Sat Jan 7 21:22:47 PST 2006
On Sat, Jan 07, 2006, Kurt Wall wrote:
>If you're using vi/vim/elvis and want to center a line of text,
>enter this command:
> :<range>center
>
>Replace <range> with the lines you want to center. Examples:
>
>To center the current line:
> :.center
>
>To center the entire file:
> :1,$center
>
>To center lines 15-29:
> :15,29center
>
>This tip brought to you by the editor `vi' and the commands `rm', `mv',
>and `ls'.
We have had a recurring series of ``Stupid Vi Tricks'' at the
Seattle Unix Group meetings. One example may be found here:
http://www.seaslug.org/Meetings/1995/Aug_vi_tricks.html
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
Marijuana will be legal some day, because the many law students
who now smoke pot will someday become congressmen and legalize
it in order to protect themselves.
-- Lenny Bruce
More information about the Linux-users
mailing list