is there a way to number the lines that are different in vimdiff? Is there a way to count the lines that are different in vimdiff?
1 Answer
You can see which lines are different in diff mode:
echo filter(range(1, line('$')), 'diff_hlID(v:val, 1) == hlID("DiffChange") || diff_hlID(v:val, 1) == hlID("DiffText")')
-
How do I use this? When I put this on the command line this is what I see
:>echo filter(range(1, line('$')), 'diff_hlID(v:val, 1) == hlID("DiffChange") || diff_hlID(v:val, 1) == hlID("DiffText")') bash: syntax error near unexpected token
(' `.– cokedudeMar 10, 2021 at 16:41 -
When I put this in vim this is what I see
E117: Unknown function: range E116: Invalid arguments for function filter(range(1, line('$')), 'diff_hlID(v:va l, 1) == hlID("DiffChange") || diff_hlID(v:val, 1) == hlID("DiffText")') E15: Invalid expression: filter(range(1, line('$')), 'diff_hlID(v:val, 1) == hlI D("DiffChange") || diff_hlID(v:val, 1) == hlID("DiffText")') Hit ENTER or type command to continue
.– cokedudeMar 10, 2021 at 16:41 -