On Sun, Nov 8, 2009 at 8:17 PM, pansz wrote:
>
>
> James Michael Fultz 写道:
>>>
>>> So why do you think sudo -e or sudo edit is better than sudo vi ?
>>
>> The latter does not preserve your personal Vim environment.
>>
> oops, got it.
>
> I setup my sudo to always preserve my personal environment for all
> commands, so I do never need the sudo -e.

It's also horrifically dangerous to use "sudo vim" when "sudoedit"
would do.  "sudo vim" means that vim runs as root, so a malicious
script, or a vim bug, could have catastrophic consequences.
"sudoedit" runs vim as your user, so malicious scripts or catastrophic
bugs can't result in an "rm -rf /" or worse being run.

If you don't absolutely *need* to run vim as root, I'd recommend
against it.  And, if you *do* need to run vim as root, I'd recommend
disabling all plugins, colorschemes, syntax highlighting, etc.  But
that's just my $0.02 - people less concerned with running an editor
with a history of exploitable bugs as root are of course welcome to do
so.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to