<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Unfortunately, fast-tags doesn't work with happy/alex/c2hs
preprocessors :(<br>
<br>
Cheers<br>
</p>
<div class="moz-cite-prefix">On 4/1/19 10:56 AM, Nathan Merkley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGRxkJK1cG_c=kkG2+bzd8v4bf3pomE48iBdFq3WHKz3Q0Dztg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">While there is probably a better way, my limited
knowledge of vimscript had me write this and it works well
enough
<div><br>
</div>
<div><br>
</div>
<div>
<div>function! UpdateHaskellTags()</div>
<div> if filereadable("tags")</div>
<div> execute "silent !grep -v '" . bufname("%") . "'
./tags > __newtags"</div>
<div> execute "silent !rm tags"</div>
<div> execute "silent !mv __newtags tags"</div>
<div> execute "silent !fast-tags " . bufname("%")</div>
<div> endif</div>
<div>endfunction</div>
<div><br>
</div>
<div>autocmd BufWritePost *.hs :call UpdateHaskellTags()</div>
<div>autocmd BufWritePost *.hsc :call UpdateHaskellTags()</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>This uses fast-tags to regenerate tags for the current file
on every save, but will only work if you are operating from
the root of your project (or wherever you keep your tags). I
use ctrlp for navigation so that's never been a problem for me</div>
<div><br>
</div>
<div>Nathan Merkley</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 1, 2019 at 9:26 AM
Vanessa McHale <<a href="mailto:vanessa.mchale@iohk.io"
moz-do-not-send="true">vanessa.mchale@iohk.io</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
all,<br>
<br>
I had been using hasktags for tag generation previously,
however, I<br>
recently discovered that using GHCi with<br>
<br>
cabal new-repl<br>
λ:> :ctags<br>
<br>
creates a tags file that actually works with preprocessors
(e.g. c2hs or<br>
alex or happy).<br>
<br>
Is there any way to run this semi-automatically?<br>
<br>
echo ':ctags' | cabal new-repl<br>
<br>
seems to work in the shell, but I'd like a vim integration if
possible<br>
(also, it's slow).<br>
<br>
Cheers,<br>
Vanessa McHale<br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a
href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to
post.</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</body>
</html>