5 ms·
you could just run vim in eshell
by harrygeez 6y ago
you could just run vim in eshell
- dan-robertson 6y agoNot really. You could run ex I guess but that would be awful. I suppose you mean running it in M-x term.
- alpaca128 6y agoVim doesn't run in Emacs' terminal because it doesn't have ncurses support. It is possible to start Vim inside Vim's terminal buffer, but it's often not usable, as the outer Vim tends to catch all the input. I usually tend to remember that after I ran `git commit`...
- terinjokes 6y agovim is definitely runnable in emacs's vterm, which is more similar to the terminal in Vim than any of emacs's shell, eshell, or eterm modes. As an evil user, I tended to remember this after I ran `git commit` and then try to remember how to pause evil so I could address vim. (I now use `with-editor` to set $EDITOR back to the parent emacs, and have mostly switched to magit)
- sea6ear 6y agoAt one point before Spacemacs was a thing, I had my 'stupid Emacs trick' - I had set up keybindings to invoke Vim as an external editor for Emacs. It took an open buffer and opened ansi-term and executed Vim on the file from the original buffer. I got some perverse pleasure in running Vim in my Emacs instance. I don't remember if I got as far as saving non-file buffers as temp files so they would be accessible to Vim or not. That would have been the next logical enhancement. Maybe it would also be possible to pipe the buffer directly into Vim? I'm not sure if Vim would display in the foreground if you did that or not. I feel like I've had situations where piping things into Vim managed to wedge it in the background, but some of that was on Windows where console process communication is a wasteland of broken dreams.