Which vimrc are you talking about? I don't use/know vim, but in many cases rc files have two kinds of "incarnation": a system-wide rc-file under /etc that dictates the system defaults for the application and user-wide rc-files under the user homedirs, where users set their own settings, that override the defaults from the system-wide configuration file.
Meanwhile, there is sudo, that runs a program as another user (usually root, maybe, like su, it allows you to impersonate users other than root).
As you're running vim through sudo, my guess is that you're expecting ~/.vimrc to be something that it isn't. Either that, or you don't understand what is sudo doing when you invoke it.
If it really is ~/.vimrc, then it's not "not working", it's actually working quite well, the issue is that there's probably no ~root/.vimrc, or it exists with different settings than these you were expecting.
roothave avimrc? – Mat Mar 13 '12 at 11:15:echo $VIM(invim) tell you? (According to my understanding of:help system-vimrc, the globalvimrcis expected to be$VIM/vimrc) – sr_ Mar 13 '12 at 11:39vimrcin/usr/share/vim/(while I do not understand why/etc/vimrcis read at all whenvimis started by a normal user) – sr_ Mar 13 '12 at 13:07