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?
Asked
Active
Viewed 451 times
1 Answers
1
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")')
Rick Howe
- 353
- 1
- 7
-
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(' `. – cokedude Mar 10 '21 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. – cokedude Mar 10 '21 at 16:41 -