1

alias vi='vim' for sudo

view story
linux-howto

https://bbs.archlinux.org – Hi all, I tried the method mentioned by harlekin and it works. The website that I googled describing this is:http://www.shellperson.net/using-sudo-with-an-alias/Just make sure you have the space in "sudo ". The space is very critical.so put this line in your .bashrc file.alias sudo="sudo "This way, if the second argument is an aliases, it will get expanded prior to passing to sudo. Very clever trick I think :0)Also, there is another way to do the 'sudo vi' command. You can just 'vi filename' as a normal user. Then in the vim editor, do ":w !sudo tee (HowTos)