1
 ~  echo $EDITOR                                  
/usr/bin/kak
 ~  sudo echo $EDITOR      
/usr/bin/kak
 ~  su                                                     
Password: 
 ⚡  /home/bjorn  echo $EDITOR
/usr/bin/kak
 ⚡  /home/bjorn  cat ~/.profile 
# nvim editor config
# export EDITOR='/usr/bin/nvim'

# kakoune editor config
export EDITOR='/usr/bin/kak'
export PAGER=$HOME/.bin/kakpager
export MANPAGER=$HOME/.bin/kakmanpager
 ⚡  /home/bjorn cat ~/.zshenv 
# nvim editor config
# export EDITOR='/usr/bin/nvim'

# kakoune editor config
export EDITOR='/usr/bin/kak'
export PAGER=$HOME/.bin/kakpager
export MANPAGER=$HOME/.bin/kakmanpager
...
 ⚡  /home/bjorn              

but it still nano

0

visudo and

Defaults env_keep += "EDITOR"

thanks to Sato Katsura for pointing me out

  • I hurried with the answer, but now it's correct – srghma Jun 13 '17 at 18:27

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.