2

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?

2
0

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")')
2
  • 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 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 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.