Matt Wozniski 写道:
> 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.

It convince me.

So the difference is: sudo -e copies the file in tmp and edit as user, 
while sudo vi edit the file as root.

Hope more user know it.


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

Reply via email to