How to use vim to open stdin and not to reset itself when switching between terminals

18 views
Skip to first unread message

Peng Yu

unread,
Apr 13, 2021, 12:22:25 AM4/13/21
to vim...@googlegroups.com
Hi,

When I use the following command to open something from stdin, it will
reset the content on the screen when I switch between terminals. Is
there a way to keep the content persistent while I switch between
terminals? Thanks.

seq 10 | { vim /dev/fd/$fd1 </dev/tty; } {fd1}<&0

--
Regards,
Peng
Message has been deleted

rwmit...@gmail.com

unread,
Apr 13, 2021, 7:48:59 AM4/13/21
to vim_use
What does that do  that:
 
seq 10 | vim -

doesn't?

Christian Brabandt

unread,
Apr 13, 2021, 7:51:19 AM4/13/21
to vim...@googlegroups.com
Not sure what you mean with
"reset the content on the screen when I switch between terminals".

But you may find :h xterm-screens useful. Or perhaps a terminal
multiplexer like screen or tmux may help.

Just giving some hints.
Christian
--
Jede Aussage, die Sie hier lesen, kann gegen Sie verwendet werden!

Peng Yu

unread,
Apr 13, 2021, 10:01:27 AM4/13/21
to vim_use
Yes. It works. Thanks.
Reply all
Reply to author
Forward
0 new messages