That's definitely the way. When I used to use Emacs, it was always running, and my $EDITOR was set to emacsclient. I had two monitors, one fully dedicated to Emacs, the other to the rest.
(setenv "EDITOR" "/usr/bin/emacsclient -c")
If you do that, it should cause any child processes (e.g.: vterm) to inherit the replaced EDITOR variable and properly open new editor frames instead of trying to do a terminal takeover. (defun open-term-here ()
"open st in `default-directory`"
(interactive)
(call-process-shell-command
(concat "st bash -c \"cd "
default-directory
" && exec zsh\"")
nil 0)) (defun tmux-here ()
(interactive)
(if (not (eq (getenv "TMUX") ""))
(shell-command (format "tmux new-window -c %s" default-directory))
(error "Not inside a tmux session.")))
I know, I know, tmux is slow and should never be used. I like it, OK.As someone who lives in org, this is the way. I'm still shell bound for a lot of things, but M-x shell is far superior, there's just no contest. Only thing that is annoying is stupid things like git diff that think they know better than you and want to do their own paging resulting in "WARNING: terminal is not fully functional". Thankfully I use EGG, but when I forget (and other things do it too), it's annoying.