Skip to content

Commit

Permalink
better autotags
Browse files Browse the repository at this point in the history
  • Loading branch information
dag committed Apr 2, 2012
1 parent d14c097 commit 349f084
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions autoload/vim2hs/haskell/tags.vim
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
function! vim2hs#haskell#tags#fasttags() " {{{
silent !find -iname '*.hs' | xargs fast-tags
function! vim2hs#haskell#tags#fasttags(...) " {{{
if a:0
let l:files = map(copy(a:000), 'shellescape(v:val)')
execute 'silent !fast-tags ' . join(l:files)
else
silent !find * -iname '*.hs' | xargs fast-tags
endif
endfunction " }}}


function! vim2hs#haskell#tags#hasktags() " {{{
silent !hasktags -c --ignore-close-implementation .
silent !hasktags -c --ignore-close-implementation *
endfunction " }}}
2 changes: 1 addition & 1 deletion plugin/haskell_tags.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif

if g:haskell_tags_generator ==# 'fast-tags'
if !executable('fast-tags') | finish | endif
autocmd BufWritePost *.hs call vim2hs#haskell#tags#fasttags()
autocmd BufWritePost *.hs call vim2hs#haskell#tags#fasttags(expand('%'))
call vim2hs#haskell#tags#fasttags()
elseif g:haskell_tags_generator == 'hasktags'
if !executable('hasktags') | finish | endif
Expand Down

0 comments on commit 349f084

Please sign in to comment.