<div dir="auto">Benjamin,<div dir="auto">Thanks for that, that should come in very handy</div><div dir="auto"><br></div><div dir="auto">Vanessa,</div><div dir="auto">While I haven't tried it, you should be able to replace fast-tags with any tool of your choice, as the script is just running a sequence of shell commands. The one caveat is that the script I sent generates tags on a per-file basis, so if generating them from the repl doesn't merge the tags file, you will have to change it to instead generate tags for the entire project directory</div><div dir="auto"><br></div><div dir="auto">Nathan Merkley</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 1, 2019, 12:10 PM Vanessa McHale <<a href="mailto:vanessa.mchale@iohk.io">vanessa.mchale@iohk.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Unfortunately, fast-tags doesn't work with happy/alex/c2hs
preprocessors :(<br>
<br>
Cheers<br>
</p>
<div class="m_9001183736539661899moz-cite-prefix">On 4/1/19 10:56 AM, Nathan Merkley
wrote:<br>
</div>
<blockquote type="cite">
<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" target="_blank" rel="noreferrer">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 noreferrer" target="_blank">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="m_9001183736539661899mimeAttachmentHeader"></fieldset>
<pre class="m_9001183736539661899moz-quote-pre">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="m_9001183736539661899moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank" rel="noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</div>
_______________________________________________<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 noreferrer" target="_blank">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>