1

Now, based on another post, I noticed that when using shell commands through vim, the message (as shown in the title) will appear once the command exit.

I know of two ways to somewhat prevent it:

silent ...

or in the case of the other post:

silent exec '!commandhere '.shellescape(getline('.'))

The second:

set shortmess=a

Now the first one seems to work on first glance, but once the [commandhere] exit, it will return to an invisible view so to speak (literally return to vim that was running, but with no text displayed).

The second method doesn't do anything as far as I'm aware. I tried both method with/without colorschemes/plugins to make sure, and I also tried both methods together/one at a time.

In the first method, command-line (ex mode) still work fine however.

Is there any way to disable this specific message? If not, maybe any message of that type (if that's the only way).

Using vim 8.2 (Huge version with GTK2, only using terminal version).

4
1

Based on this answer, I came up with the following:

:silent exec '!commandhere '.shellescape(getline('.'))<CR>:redr!<CR>

This works.

The other alternative as mentioned in the comment would be this plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.