how to redirect pipe output to vim in case remote?

23 views
Skip to first unread message

justrajdeep

unread,
Jul 7, 2022, 12:21:16 PM7/7/22
to vim_use

Hi

The following command works

ls | gvim -

But

ls | gvim --servername GVIM1 --remote-tab -

does not?

shouldnt it be similar in operation?


Thanks

M

unread,
Jul 7, 2022, 12:56:19 PM7/7/22
to vim...@googlegroups.com


чт, 7 июл. 2022 г., 19:21 justrajdeep <justr...@gmail.com>:
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7da748ad-0e0d-44f1-b007-391438b1a911n%40googlegroups.com.

No, it is not. Stdin /stdout cannot be shared among different processes, except ones in parent-child relationship.

You can redirect output to file and pass that file name instead.

Regards,
Matvey

Bram Moolenaar

unread,
Jul 7, 2022, 2:43:13 PM7/7/22
to vim...@googlegroups.com, justrajdeep

> The following command works
> *ls | gvim - *
>
> But
> *ls | gvim --servername GVIM1 --remote-tab - *
>
> does not?
>
> shouldnt it be similar in operation?

That doesn't work because the remote gvim does not have access to this
stdin. You will have to save the text into a file first, then you can
tell the remote gvim to open that file.

--
hundred-and-one symptoms of being an internet addict:
76. Your ISP regards you as a business partner rather than as a customer.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

rajdeep mondal

unread,
Jul 7, 2022, 2:48:31 PM7/7/22
to Bram Moolenaar, vim...@googlegroups.com
Hi Bram

Is it the same even if it is from a terminal run inside vim?
--
==============================
Rajdeep
==============================

Bram Moolenaar

unread,
Jul 7, 2022, 5:21:40 PM7/7/22
to vim...@googlegroups.com, rajdeep mondal

> Is it the same even if it is from a terminal run inside vim?

That is a separate terminal, running its own shell. That stdin is owned
by the shell, thus it doesn't make a difference.

--
hundred-and-one symptoms of being an internet addict:
79. All of your most erotic dreams have a scrollbar at the right side.
Reply all
Reply to author
Forward
0 new messages