On Thu, February 4, 2010 6:38 pm, drlatex wrote:
> Is it possible for vim to search for repeated strings in a document ?
>
> But the file:
>
> 1234
> 2345
> 1567
> 1234
> 3214
>
> has the redundancy on lines 1 and 4.
>
> This might be hard because in the first file, the string 'bc' is in fact
> repeated on lines 1 and 6, but I am looking for if the file has two lines
> that are redundant.
>

Well, Do you mean lines or words? For lines, this should work:
/^\C\(.\+\_$\)\ze\_.*\_^\1
for words, this might work:
/\C\<\([^\W]*\)\ze\>\_.*\<\1\>


regards,
Christian

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to