tmux-plugins/tmux-fpp

Not respecting EDITOR

wpcarro opened this issue · 3 comments

I've tried setting the following variables:

export FPP_EDITOR='emacsclient -n'
export EDITOR='emacsclient -n'
export VISUAL='emacsclient -n'

...but I cannot get tmux-fpp to open the files in anything other than vim.

However, when I run:

git status | fpp

...that will open my files using emacsclient -n

Any idea what's going on here?

My guess is that all three variables are unavailable. According to fpp's docs, that's when vim is used:

The $FPP_EDITOR environment variable can be set to tell PathPicker
which editor to open the selected files with. If that variable
is not set, $VISUAL and then $EDITOR are used as fallbacks,
with "vim" as a last resort.

+1

export EDITOR="nvim"
export VISUAL="nvim"
export FPP_EDITOR="nvim"

when I use fpp directly, it works.
But in tmux-fpp it always invoke nano.

KapJI commented

tmux is not capturing your environment correctly, it's nothing to do with the plugin itself. If you run tmux from .bashrc or .zshrc make sure you're setting these variables before running tmux.
You can check these vars by adding echo $EDITOR in fpp.tmux, it's just a bash script.