~ $ 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
ベストアンサー1
非水道と
Defaults env_keep += "EDITOR"
指摘してくれた佐藤勝浦に感謝します。