[vim/vim] How to avoid vim set terminal to raw mode when stdin is /dev/null? (Issue #15893)

19 views
Skip to first unread message

user202729

unread,
Oct 18, 2024, 12:03:20 AM10/18/24
to vim/vim, Subscribed

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: #3313


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15893@github.com>

Christian Brabandt

unread,
Oct 18, 2024, 8:55:00 AM10/18/24
to vim/vim, Subscribed

(the terminal is set to raw mode or something.)

What does that mean exactly?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15893/2422413285@github.com>

user202729

unread,
Oct 18, 2024, 12:04:45 PM10/18/24
to vim/vim, Subscribed

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.)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15893/2422797123@github.com>

Christian Brabandt

unread,
Oct 18, 2024, 2:05:22 PM10/18/24
to vim/vim, Subscribed

hm, strange. And why are you redirecting stdin? Why not echo | command vim -v --not-a-term -T dumb -c "quitall!"


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15893/2422982404@github.com>

user202729

unread,
Nov 10, 2024, 6:27:34 AM11/10/24
to vim/vim, Subscribed

It wasn't exactly something I control, zathura is spawned by vimtex with stdin closed (I think).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15893/2466695972@github.com>

Reply all
Reply to author
Forward
0 new messages