Skip to content

Commit

Permalink
Filter the information tags
Browse files Browse the repository at this point in the history
* Remove the pseudo-tags generate by ctags
  • Loading branch information
kien committed Dec 14, 2011
1 parent 9bff726 commit bf03741
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion autoload/ctrlp/tag.vim
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,30 @@ fu! s:findcount(str)
endfo
retu [fnd, pos]
endf

fu! s:filter(tags)
let [nr, alltags] = [0, a:tags]
wh 0 < 1
if alltags[nr] =~ '^!' && alltags[nr] !~ '^!_TAG_'
let nr += 1
con
en
if alltags[nr] =~ '^!_TAG_' && len(alltags) > nr
cal remove(alltags, nr)
el
brea
en
endw
retu alltags
endf
" Public {{{1
fu! ctrlp#tag#init(tagfiles)
if empty(a:tagfiles) | retu [] | en
let tagfiles = sort(s:nodup(a:tagfiles))
let s:ltags = join(tagfiles, ',')
let g:ctrlp_alltags = []
for each in tagfiles
let alltags = ctrlp#utils#readfile(each)
let alltags = s:filter(ctrlp#utils#readfile(each))
cal extend(g:ctrlp_alltags, alltags)
endfo
sy match CtrlPTabExtra '\zs\t.*\ze$'
Expand Down

0 comments on commit bf03741

Please sign in to comment.