Nice vi Trick

Kurt Wall kwall
Sat Jan 7 18:22:47 PST 2006


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'.

Kurt
-- 
Did you know ...

That no-one ever reads these things?


More information about the Linux-users mailing list