tmux run-shell runs command as sh -c which doesn't source .bashrc. Also on some systems sh is not a bash at all but dash. So one have to explicitly run bash and pass functions using --rcfile optionsource the file where required function defined before calling it: bind-key t run-shell "bash --rcfile ~/.tmux.bash -c 'tmux__ranger_to_vim'"
bind-key t run-shell 'bash -c "source ~/.tmux.bash ; tmux__ranger_to_vim"'