tmux-plugins/tmux-open

Can't set other editor than vim

guygadebois opened this issue · 2 comments

Hey, thanks for this cool plugin!
I'd really like to have files opening with emacs though!
As written in the doc, I've tried to set $EDITOR in my .zshrc, and reload my terminal env (even restarting tmux)
Tried both with "emacs" an "/usr/bin/emacs" but vim keeps opening when I hit C-o.

Hmm.. it looks like the default EDITOR value, which is vi, is kicking in for you. Here's the relevant function https://github.com/tmux-plugins/tmux-open/blob/master/open.tmux#L28-L34
I'm surprised this is failing even after tmux restarts as there's really no magic to this..

Thank you for the pointer!
I've finally spotted the issue: in my setup my shell emulator (konsole) opens directly tmux, and tmux then uses zsh underlying.
So my $EDITOR env value was set for zsh, but not for tmux.
I've added setenv EDITOR "emacs -nw" in my tmux.conf file and now it works!

Closing this issue as this had nothing to do with tmux-open