1

I'm setting up a brand new computer and one quirk that I can't figure out is that neomutt is using nano as its default editor. My default editor is vim. Why wouldn't neomutt respect that?

  • 1
    do you have set editor or set visual somewhere in the (neo)?mutt config? – thrig Jul 16 '18 at 23:17
  • How are you setting vim as your default editor? what does your shell show with echo $EDITOR? – Tim Kennedy Jul 16 '18 at 23:18
  • Sigh. I thought that it was set in .bashrc but it wasn't. Not sure why edit whatever.txt was defaulting to vim and neomutt to nano, but nothing was set explicitly. – Amanda Jul 17 '18 at 0:45
  • 2
    There's a table of priorities here 1.3. Config Priority; also iirc $VISUAL will take priority over $EDITOR – steeldriver Jul 17 '18 at 1:07
  • 1
    A related question is unix.stackexchange.com/questions/410668 . – JdeBP Jul 17 '18 at 10:32
3

neomutt should follow the table of priorities in their documentation to decide what editor to use.

You can set the editor explicitly by adding export EDITOR="/usr/bin/vim" to your .bashrc.

Alternatively, if you only want to set the editor for neomutt, you can add the following to ~/.neomuttrc:

set editor="/usr/bin/vim"
  • 1
    And to add to that: The export EDITOR=... line should go into your shell profile (other programs might use it, too). – dirkt Jul 17 '18 at 6:29
  • @dirkt let's see if it works for the OP first – slm Jul 17 '18 at 11:14
  • Setting the editor explicitly in .bashrc worked to change the editor, but I'm still working on figuring out why it was defaulting to nano in the first place. – Amanda Jul 17 '18 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.