Closed jetm closed 12 months ago
What you're looking for is probably :h :diffsplit
. It's a builtin command. Or if you want to start diff mode from the shell, see :h start-vimdiff
.
thank you for the quick response. See above I am passing -d
flag. That calls start-vimdiff
.
Yes, but you're using it wrong. As explained in the docs -d
already starts nvim in diff-mode. You shouldn't be running :DiffviewOpen
on top of that. You simply pass any 2-8 file arguments for the files you want to compare.
So, does it mean diffview cannot be used on top of diff mode?
What do you mean? What do you expect to happen?
I was thinking diffview is an improvement over built-in diff-mode and the former will make better the experience diffing the changes.
The plugin uses the builtin diff-mode as-is. What we build on top of that are diff related tools for working with VCS. Comparing revisions, editing staging areas, traversing and exploring file history, tracing line history, searching, filtering and ordering history etc.
I understand now. Thank you for the explanation.
Description
Thank you for
diffview.nvim
useful plugin.Based on the documentation it looks it's not supported to get a diffview between two files are not under a Version Control Software. Is it that correct?
Expected behavior
I tried something like this
nvim -d -c 'DiffviewOpen' /tmp/file1 /etc/file1.new
andnvim -d -c 'DiffviewOpen /tmp/file1 /etc/file1.new'
Actual behavior
I was expecting to get a diff2_horizontal from two files that are not under a VCS. But it maybe not supported.
Steps to reproduce
nvim -d -c 'DiffviewOpen' /tmp/file1 /etc/file1.new
ornvim -d -c 'DiffviewOpen /tmp/file1 /etc/file1.new'
Health check
Output of
``` ============================================================================== diffview: require("diffview.health").check() Checking plugin dependencies ~ - OK nvim-web-devicons installed. Checking VCS tools ~ - The plugin requires at least one of the supported VCS tools to be valid. - OK Git found. - OK Git is up-to-date. (2.41.0) - WARNING Configured `hg_cmd` is not executable: 'hg' ```:checkhealth diffview
Log info
Relevant info from
``` ############################ ### PUT LOG CONTENT HERE ### ############################ ```:DiffviewLog
Neovim version
Operating system and version
Linux 6.1.38-1-MANJARO x86_64 GNU/Linux
Minimal config