vim Jump to the next non-identical line
vim
Solution
You could define your own fold-expr:
first set fdm:
:set fdm=expr
then
:set foldexpr=getline(v:lnum)==#getline(v:lnum-1)?1:0
now you can test by typing zM, to close all fold, if you are lucky ^_^ all duplicated lines are folded.
you could type zR to open all folds.
if it works and you open those kind of file very often, you could put the above lines in your .vimrc.(au with ft) if only one time job, you can write mode line into that file.
Problem
I am looking at files that may have several consecutive identical lines. Is there a easy way of jumping to the next non-identical line? Alternatively I would like to be able to fold all the lines that are equal to the initial one showing just the number of linees that are folded.