user3281743
user3281743

Reputation: 295

Suppressing Vimdiff message

I tried looking online and it seems that no one has a simple answer to it.

In my bash script, I use vimdiff for two files, but after I close the vimdiff it shows "2 files to edit" whenever the files differ. It seems like no one has the solution to this I was wondering if there was a short way in my bash script to suppress that message not through .vimrc edits.

Upvotes: 4

Views: 366

Answers (1)

johnsyweb
johnsyweb

Reputation: 141790

Looking at Vim 7.4.265's startup code, there is no way to suppress the %d files to edit message being emitted to the terminal (and hence being visible after exit) when invoked as vimdiff.

I guess you could always submit a patch to suppress this message with a switch.


Update

I knew there would be a way to get the result you desired (without writing C)!

Invoke Vim as vim with one file argument. And then call :diffsplit on the second file. But from the command-line, via -c:

vim /path/to/first_file -c'diffsplit /path/to/second_file'

Upvotes: 3

Related Questions