Vimdiff message suppression

I tried looking on the Internet, and it seems that there is no easy answer.

In my bash script, I use vimdiff for two files, but after closing vimdiff it shows "2 files for editing" whenever the files are different. It seems that no one has a solution for this. I was wondering if there was a shortcut in my bash script to suppress this message not using .vimrc changes.

+4
source share
1 answer

Looking at the Vim 7.4.265 startup code , there is no way to suppress the message %d files to editcoming from the terminal (and therefore being visible after exiting) when called vimdiff.

I think you can always send a patch to suppress this message using the switch.


Update

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

Call Vim as vimwith one file argument. Then call :diffsplitto the second file. But from the command line through -c:

vim /path/to/first_file -c'diffsplit /path/to/second_file'
+3
source

Source: https://habr.com/ru/post/1538151/


All Articles