You'll probably want to look into using Emacs as a server. Emacs creeps up on you, you'll be surprised looking back on this comment in a year.
Re:Emacs in odd places
by crankyoldcrank on Monday November 16, 2020 @03:04PM
(#25116334)
In Emacs, add (start-server) to your config. Then in your shell rc file:
alias vim='emacsclient -a/usr/bin/vim -nw'
Now if emacs is running you'll get emacs in the terminal when you use the command vim to open a file. If it's not running, vim opens it instead.
Super slick for converts from the vim workflow
I think using the `--daemon` flag is better. Especially because you can then name the server session. I do this with an unnamed daemon for general use, but a project or language name for other efforts. It helps keep my configurations and buffers cleanly separated based on context.
So far I'm still far more comfortable in vim and the terminal -- even, for instance, switching back to my terminal to do `bean-check` rather than doing it within emacs itself. I could see myself keeping my use of emacs pretty limited like this indefinitely, and still finding it useful - I'm unlikely to give up these uses of emacs. Maybe over a long enough time horizon emacs will feel a bit less strange to me and I'll find more places it fits a niche, or maybe not. Either way, it's a nice addition to my tool set, and I'll be curious to see where I land with in in a year or so.