~ $ echo $EDITOR
/usr/bin/kak
~ $ Sudo echo $EDITOR
/usr/bin/kak
~ $ su
Password:
/home/myusername $ echo $EDITOR
/usr/bin/kak
/home/myusername $ 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/myusername 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/myusername $
but it still nano
visudoと
Defaults env_keep += "EDITOR"
指摘してくれた佐藤桂に感謝します