'vimdiff a b' always prints "2 files to edit". I don't want to see that. How can I avoid it?
Here is an example:
⚡ vimdiff a b
2 files to editI want to use vimdiff from a bash script and don't want to see this output
103 Answers
Looking through the vim source, it looks like that message can only be
suppressed when launching the executable as ex and using its -s option, or by not having a console.
Neither approach will work for diffing.
However, the message is only output if there is more than one file specified on the command line.
So let's trick it:
vim a -c "vert diffsplit b"Which basically says "Edit file a with vim, and once a is loaded, open a vertical split with file b and diff them".
5Set in your .vimrc
set shortmess=at 1 According to this post on SO, setting this in your vimrc should do the trick:
set shortmess=filnxtToO 1