How to suppress screen message when using indentation in command line?

19 views
Skip to first unread message

Peng Yu

unread,
Mar 30, 2022, 11:12:34 AM3/30/22
to vim_use
Hi,

I see the message like "4 lines indented ... 60B written". I do not see to this message. Besides piping it to /dev/null, is there a way to configure vim so that vim doesn't print it in the first place?

$ vim -n --cmd ':set t_ti= t_te=' -X -E -c 'normal gg=G' -c x /tmp/mktemp/tmp.6CgoYSnUWk.sh < /dev/tty
4 lines indented
"/private/tmp/mktemp/tmp.6CgoYSnUWk.sh" 4L, 60B written

Christian Brabandt

unread,
Mar 30, 2022, 4:04:58 PM3/30/22
to vim_use
:set report=1000


Best,
Christian
--
Leitfaden durch die Phraseologie wissenschaftlicher Veröffentlichungen:
Englisch:
To our knowledge, this is the first paper which reports that
Deutsch:
Prioritätsanspruch für eine unbedeutende Entdeckung

Peng Yu

unread,
Mar 30, 2022, 6:52:47 PM3/30/22
to vim_use
Now I still get this message. How to remove this message?

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c x x.sh < /dev/tty
"x.sh" 4L, 61B
"x.sh" 4L, 60B written


:set report=1000

Christian Brabandt

unread,
Mar 31, 2022, 3:01:40 AM3/31/22
to vim_use

On Mi, 30 Mär 2022, Peng Yu wrote:

I am not sure why it matters so much. But try using `:silent`


Best,
Christian
--
Tritt man auf die Harke drauf, gibt's am Kopf 'n blauen Knauf.

Bram Moolenaar

unread,
Mar 31, 2022, 6:38:36 AM3/31/22
to vim...@googlegroups.com, Peng Yu
As Christian suggested, using :silent for the :x command is probably best:

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c 'silent x' x.sh < /dev/tty

You could also add the "-s" argument, but that might also hide error
messages.

--
TALL KNIGHT: Firstly. You must get us another shrubbery!
OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni!
ARTHUR: Not another shrubbery -
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// 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 ///

Peng Yu

unread,
Mar 31, 2022, 6:55:53 AM3/31/22
to vim_use
I still get this message. How to suppress it but leave potential error messages still printed?

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c 'silent x' x.sh < /dev/tty
"x.sh" 4L, 61B
Reply all
Reply to author
Forward
0 new messages