We’re rewarding the question askers & reputations are being recalculated! Read more.
4

What happens here is, that the bufdo and argdo command iterate over all buffers themselves. However without writing your changes, vim will refuse to load the next buffer, unless the 'hidden' option is set (which it is not by default) or the argument to the buf/arg-doc comment does write the change itself. So this will work: ex -s -c'bufdo! %s/\s\+$//e|w' -...


2

This is by design. The :help :! (a closely related command) offers this: Vim redraws the screen after the command is finished, because it may have printed any text. This requires a hit-enter prompt, so that you can read any messages. To avoid this use: :silent !{cmd} The screen is not redrawn then, thus ...


1

Providing the argument "+silent /${SEARCHTERM}" to vim was my solution. This should be equivalent to running the :/ search using :silent / which does the trick. No need to change how vim normally behaves with searches!


Only top voted, non community-wiki answers of a minimum length are eligible