How to avoid vim set terminal to raw mode when stdin is /dev/null?
Instructions: Replace the template text and remove irrelevant text (including this line)
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Currently vimtex uses vim -v --not-a-term -T dumb -c … to invoke some function as needed. This is invoked inside zathura.
However, if you run in bash
command vim -v --not-a-term -T dumb -c "quitall!" < /dev/null # mess the terminal up
(the terminal is set to raw mode or something.)
Apparently when both stdin and stderr are redirected to /dev/null then it's fine.
command vim -v --not-a-term -T dumb -c "quitall!" < /dev/null 2> /dev/null # okay
command vim -v --not-a-term -T dumb -c "quitall!" 2> /dev/null # okay
Describe the solution you'd like Vim should return the terminal to normal on exit, or otherwise it should not put the terminal to raw mode in the first place.
Related: https://github.com/vim/vim/issues/3313
(the terminal is set to raw mode or something.)
What does that mean exactly?
Means when I type subsequent bash commands, nothing appears (if I type reset then press enter then things are fixed but I don't see the reset itself.)
hm, strange. And why are you redirecting stdin? Why not echo | command vim -v --not-a-term -T dumb -c "quitall!"
It wasn't exactly something I control, zathura is spawned by vimtex with stdin closed (I think).