Thursday, March 31, 2022

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

Peng Yu wrote:

> 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

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

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220331103828.723481C176F%40moolenaar.net.

No comments: