sudo in terminal

Alexander Dalloz ad+lists at uni-x.org
Tue Feb 22 21:41:13 UTC 2005


Am Di, den 22.02.2005 schrieb H. Crissman um 20:13:

> When I "vi example.file" the text inside the file is color coded based 
> on format (ie. commented out lines are blue). But when I "sudo vi 
> example.file" that color coding is lost. How can I enable that when I 
> edit a file using sudo? It really helps when you are looking at a long 
> config file.

> H. Crissman

vi is not vim. vi is just an alias to vim. So if you use "sudo" you
invoke vi instead of vim. vi has no highlighting capabilities, which is
even a feature provided by the vim-enhanced package.

sudo vim <file>

and you have back your syntax highlighting.

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.10-1.14_FC2smp 
Serendipity 22:38:19 up 1 day, 9:47, load average: 0.28, 0.57, 0.43 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050222/2cab9a8e/attachment-0001.sig>


More information about the fedora-list mailing list