kien/ctrlp.vim — Issue #107: 'rts' plugin displays duplicates
Author: datanoise
Created: 2012-01-21 05:55:08+00:00
State: open

When you use pathogen, &rts contains your .vim directory as well as every directory under .vim/bundle, that's why there are duplicates. This patch fixes it:

``` diff
diff --git a/autoload/ctrlp/rtscript.vim b/autoload/ctrlp/rtscript.vim
index 77a7a1f..2594966 100644
--- a/autoload/ctrlp/rtscript.vim
+++ b/autoload/ctrlp/rtscript.vim
@@ -27,6 +27,8 @@ fu! ctrlp#rtscript#init()
if g:ctrlp_newrts || !exists('g:ctrlp_rtscache')
sil! cal ctrlp#progress('Indexing...')
let entries = split(globpath(&rtp, '**/*.\(vim\|txt\)'), "\n")
+ " remove dups
+ let entries = filter(copy(entries),'index(entries, v:val, v:key+1)==-1')
let [g:ctrlp_rtscache, g:ctrlp_newrts] = [ctrlp#dirnfile(entries)[1], 0]
en
retu g:ctrlp_rtscache
```