Hi-
I’m trying to change the default editor away from nano to vim.
Trying this:
gloria|john ➜ / sudo update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/nano 40 manual mode
2 /usr/bin/mcedit 25 manual mode
3 /usr/bin/vim.tiny 15 manual mode
Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode
update-alternatives: error: unable to remove '/usr/share/man/da/man1/editor.1.gz.dpkg-tmp': Read-only file system
I assume this is failing due to the Read-only file system discussed in the thread that has this suggestion to
You can re-enable r/w on the rootfs without installing the dev tools by running:
sudo /usr/local/libexec/disable-rootfs-protection
Bear in mind there is no enable-rootfs-protection - we recommend backing up your configuration before enabling this.
But… I don’t really want to disable-rootfs-protection if this is the problem.
Does anyone know of an -ahem- alternative to update-alternatives, or another way to change the default editor?
Cheers
John