Re: vipw and vigr default editor
- Date: Fri, 5 Jan 2018 17:04:07 -0500
- From: John Ratliff <john@xxxxxxxxxxxxxx>
- Subject: Re: vipw and vigr default editor
On 1/5/2018 3:25 PM, Roberto C. Sánchez wrote:
On Fri, Jan 05, 2018 at 03:00:43PM -0500, John Ratliff wrote:
When I run
sudo vipw or sudo vigr, it uses nano as the default editor. I've already
used update-alternatives to select vim as my default editor, but this
doesn't seem to work for vipw/vigr.
I have to do
sudo EDITOR=vim vipw
How can I make vim the default editor for vipw/vigr. Or how can I set the
EDITOR variable when I use sudo automatically?
Try 'sudo select-editor'
This was the solution.