Jump to page: 1 2
Thread overview
d2tags - converts DMD2's JSON output to Exuberant Ctags format
May 06, 2010
MIURA Masahiro
May 06, 2010
Bernard Helyer
May 06, 2010
Leandro Lucarella
May 06, 2010
Robert Clipsham
May 07, 2010
MIURA Masahiro
May 06, 2010
Pelle
May 06, 2010
Leandro Lucarella
May 06, 2010
Masahiro Nakagawa
May 06, 2010
Lutger
May 06, 2010
Bernard Helyer
May 07, 2010
MIURA Masahiro
May 07, 2010
Ali Çehreli
May 07, 2010
Nick Sabalausky
May 07, 2010
Leandro Lucarella
May 06, 2010
Hi,

Being happy to see issue 3415 (broken JSON format) fixed,
I have written a utility to convert DMD2's JSON output
to Exuberent Ctags format.  This enables you to tagjump in Vim
and other editors/IDEs.  It's just 150+ lines, thanks to D2's
powerful string handling.  Enjoy!

http://github.com/Dubhead/d2tags

usage:
% dmd -Xftags.json foo.d
% d2tags tags.json > tags
May 06, 2010
On 06/05/10 22:46, MIURA Masahiro wrote:
> Hi,
> 
> Being happy to see issue 3415 (broken JSON format) fixed,
> I have written a utility to convert DMD2's JSON output
> to Exuberent Ctags format.  This enables you to tagjump in Vim
> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
> powerful string handling.  Enjoy!
> 
> http://github.com/Dubhead/d2tags
> 
> usage:
> % dmd -Xftags.json foo.d
> % d2tags tags.json>  tags

Awesome!
May 06, 2010
MIURA Masahiro, el  6 de mayo a las 19:46 me escribiste:
> Hi,
> 
> Being happy to see issue 3415 (broken JSON format) fixed,
> I have written a utility to convert DMD2's JSON output
> to Exuberent Ctags format.  This enables you to tagjump in Vim
> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
> powerful string handling.  Enjoy!
> 
> http://github.com/Dubhead/d2tags
> 
> usage:
> % dmd -Xftags.json foo.d
> % d2tags tags.json > tags
  % vim -t tags foo.d

Great!

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Que barbaridad, este país se va cada ves más pa' tras, más pa' tras...
	-- Sidharta Kiwi
May 06, 2010
On 06/05/10 11:46, MIURA Masahiro wrote:
> Hi,
>
> Being happy to see issue 3415 (broken JSON format) fixed,
> I have written a utility to convert DMD2's JSON output
> to Exuberent Ctags format.  This enables you to tagjump in Vim
> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
> powerful string handling.  Enjoy!
>
> http://github.com/Dubhead/d2tags
>
> usage:
> % dmd -Xftags.json foo.d
> % d2tags tags.json>  tags

I love it! I don't suppose you have a guide for how to get it set up and working in vim do you? I've never managed to get ctags working, even with C/C++ :/
May 06, 2010
MIURA Masahiro wrote:
> Hi,
> 
> Being happy to see issue 3415 (broken JSON format) fixed,
> I have written a utility to convert DMD2's JSON output
> to Exuberent Ctags format.  This enables you to tagjump in Vim
> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
> powerful string handling.  Enjoy!
> 
> http://github.com/Dubhead/d2tags
> 
> usage:
> % dmd -Xftags.json foo.d
> % d2tags tags.json > tags

Very useful, and a beautiful example of D scripting.

I wonder if this is of enough general utility to warrant inclusion within the D distribution, along with rdmd. Thoughts?

One small suggestion, Masahiro: you may want to replace the file reading
loop in main() with simply std.file.readText(args[1]).


Andrei
May 06, 2010
On 05/06/2010 06:48 PM, Andrei Alexandrescu wrote:
> I wonder if this is of enough general utility to warrant inclusion
> within the D distribution, along with rdmd. Thoughts?
>

Yes please, rdmd --tags would be great.
May 06, 2010
Pelle wrote:
> On 05/06/2010 06:48 PM, Andrei Alexandrescu wrote:
>> I wonder if this is of enough general utility to warrant inclusion
>> within the D distribution, along with rdmd. Thoughts?
>>
> 
> Yes please, rdmd --tags would be great.

I was thinking of including the utility as a separate program.

Andrei
May 06, 2010
Andrei Alexandrescu, el  6 de mayo a las 09:48 me escribiste:
> MIURA Masahiro wrote:
> > Hi,
> > 
> > Being happy to see issue 3415 (broken JSON format) fixed,
> > I have written a utility to convert DMD2's JSON output
> > to Exuberent Ctags format.  This enables you to tagjump in Vim
> > and other editors/IDEs.  It's just 150+ lines, thanks to D2's
> > powerful string handling.  Enjoy!
> > 
> > http://github.com/Dubhead/d2tags
> > 
> > usage:
> > % dmd -Xftags.json foo.d
> > % d2tags tags.json > tags
> 
> Very useful, and a beautiful example of D scripting.
> 
> I wonder if this is of enough general utility to warrant inclusion within the D distribution, along with rdmd. Thoughts?

I think it might be better to add support to the common tools, like exuberant-ctags[1], but having it as part of rdmd or whatever could be nice too.

[1] http://ctags.sourceforge.net/

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
A lo que Peperino respondióles: aquel que tenga sabañones que se los
moje, aquel que padece calvicie no padece un osito, no es bueno comer
lechón en día de gastritis, no mezcleis el vino con la sandía, sacad la
basura después de las ocho, en caso de emergencia rompa el vidrio con
el martillo, a cien metros desvio por Pavón.
	-- Peperino Pómoro
May 06, 2010
On Fri, 07 May 2010 01:48:59 +0900, Andrei Alexandrescu
<SeeWebsiteForEmail@erdani.org> wrote:

> MIURA Masahiro wrote:
>> Hi,
>>
>> Being happy to see issue 3415 (broken JSON format) fixed,
>> I have written a utility to convert DMD2's JSON output
>> to Exuberent Ctags format.  This enables you to tagjump in Vim
>> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
>> powerful string handling.  Enjoy!
>>
>> http://github.com/Dubhead/d2tags
>>
>> usage:
>> % dmd -Xftags.json foo.d
>> % d2tags tags.json > tags
>
> Very useful, and a beautiful example of D scripting.
>
> I wonder if this is of enough general utility to warrant inclusion
> within the D distribution, along with rdmd. Thoughts?

vote++
May 06, 2010
Andrei Alexandrescu wrote:

> MIURA Masahiro wrote:
>> Hi,
>> 
>> Being happy to see issue 3415 (broken JSON format) fixed,
>> I have written a utility to convert DMD2's JSON output
>> to Exuberent Ctags format.  This enables you to tagjump in Vim
>> and other editors/IDEs.  It's just 150+ lines, thanks to D2's
>> powerful string handling.  Enjoy!
>> 
>> http://github.com/Dubhead/d2tags
>> 
>> usage:
>> % dmd -Xftags.json foo.d
>> % d2tags tags.json > tags
> 
> Very useful, and a beautiful example of D scripting.
> 
> I wonder if this is of enough general utility to warrant inclusion within the D distribution, along with rdmd. Thoughts?

Yes it's very useful. How about also including the source in the examples directory?
« First   ‹ Prev
1 2