You are not logged in.
Pages: 1
I use vim for most of my work but its a general habit to just type vi in the shell and make vim open.
I have mentioned
alias vi="vim"
in the ~/.bashrc file
but I also want this to be done with
sudo vi
Hoe can this be achieved?
Last edited by theta (2010-03-28 08:19:46)
Offline
You could use:
alias svi="sudo vim"
or some variant thereof...
Offline
alias sudo="sudo "
If the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.
Last edited by chpln (2010-03-28 08:06:50)
Offline
I believe if I understand your question right...adding this to your ~/.bashrc will do that.
alias sudo='sudo '
Note the space at the end.
Edit: Bah! You have won this time, chpln, but next time I will defeat you!
Last edited by Kiwi (2010-03-28 08:09:02)
Offline
Thanks, that solved my problem
Offline
Pages: 1