Skip to main content
Improves the answer based on the new commit.
Source Link
kenorb
  • 18.8k
  • 19
  • 73
  • 136

ThisIn Vim, this issue has been addressed in 234d162 commit (>=v8.0.1387).

Solution: Don't show the message with --not-a-term was used.

So the message is only displayed when user hasn't redirected the stdin.


Similar issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.

This issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.

In Vim, this issue has been addressed in 234d162 commit (>=v8.0.1387).

Solution: Don't show the message with --not-a-term was used.

So the message is only displayed when user hasn't redirected the stdin.


Similar issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.

added 2 characters in body
Source Link
kenorb
  • 18.8k
  • 19
  • 73
  • 136

This issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.

This issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.

This issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.

Source Link
kenorb
  • 18.8k
  • 19
  • 73
  • 136

This issue has been addressed in the recent version of Neovim (>=v0.2.2-dev) which you could use instead of Vim.

Once NVim v0.2.2 is released, you should be able to run:

$ echo foo | nvim -

without having the message.


For Vim, you need to use this custom patch proposed by @rdebath:

diff --git a/src/fileio.c b/src/fileio.c
index 87a46b1..939403b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -825,7 +825,7 @@ readfile(
         * still be running, don't move the cursor to the last line, unless
         * always using the GUI.
         */
-       if (read_stdin)
+       if (read_stdin && isatty(0))
        {
 #ifndef ALWAYS_USE_GUI
            mch_msg(_("Vim: Reading from stdin...\n"));

So it's only displayed when user hasn't redirected stdin.