I should note first, this issue occurs on Mac, not Linux. Presently, I'm using OS X (10.8.2), I cannot speak for any other OS X versions.
When opening any python script, the file opens for editing as you would expect:
When opening any python script using sudo on a Mac, it opens but with an error:
$ sudo vi setup.py
Error detected while processing /Users/user_name/.vim/bundle/pysmell/pysmell.vim:
line 41:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pysmell
Press ENTER or type command to continue
The error does not hinder editing of the file, pressing ENTER again leads to expected editing and saving behavior. It's just irritating.
NOTE1: I've followed the prescribed method for using sudo on OS X:
- Add my user to the Admin group
- sudo visudo (and modify line to)
%admin ALL=(ALL) NOPASSWD: ALL
so I wouldn't get nagged for a password.
NOTE2:
I'm using MacVim (MacPorts; next time I'll use the binary - I already know) with some expected exports/aliases:
$ cat .bash_profile
source "$HOME/.bashrc"
$ grep vim .bashrc
alias vi='/opt/local/bin/mvim -v'
alias vim='/opt/local/bin/mvim -v'
export EDITOR='/opt/local/bin/mvim -v'
I'm not sure why this is happening or if it's even something that can/should be fixed. It doesn't happen on Linux so the severity is somewhat low.
As I have seen no mention of this issue in the wild I assume there is a fix and it's just "known" somehow. In the case anyone else runs into it, it will be documented here.
Cheers,
TT
I should note first, this issue occurs on Mac, not Linux. Presently, I'm using OS X (10.8.2), I cannot speak for any other OS X versions.
When opening any python script, the file opens for editing as you would expect:
When opening any python script using sudo on a Mac, it opens but with an error:
The error does not hinder editing of the file, pressing ENTER again leads to expected editing and saving behavior. It's just irritating.
NOTE1: I've followed the prescribed method for using sudo on OS X:
%admin ALL=(ALL) NOPASSWD: ALL
so I wouldn't get nagged for a password.
NOTE2:
I'm using MacVim (MacPorts; next time I'll use the binary - I already know) with some expected exports/aliases:
I'm not sure why this is happening or if it's even something that can/should be fixed. It doesn't happen on Linux so the severity is somewhat low.
As I have seen no mention of this issue in the wild I assume there is a fix and it's just "known" somehow. In the case anyone else runs into it, it will be documented here.
Cheers,
TT