I wanted to add set mouse=a
to the .vimrc
file to add point and click cursor, but the /etc/vim/vimrc
file is read-only and won't allow me to edit or delete it. I tried to uninstall and reinstall vim
but the .vimrc
file remained unchanged.
Additionally when I try to edit it from terminal using
sudo vim /etc/vim/vimrc
it says
Found a swap file by name of 'filename'
Apparently it says I edited the same file twice.
.vimrc
andvimrc
are not the same filename – wjandrea May 10 '19 at 17:05sudo
to edit a file, usesudoedit /etc/whatever
instead ofsudo vim /etc/whatever
. (You'll need to addexport EDITOR=/usr/bin/vim
to~/.bashrc
.) You get your own.vimrc
, not root's, and you can't run privileged shell commands from within vim. – AuxTaco May 10 '19 at 20:06