www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Vim: Anyone using taglist.vim with D?

reply Andrej Mitrovic <none none.none> writes:
I know there's a few people here that use Vim, so has anyone succesfully used
the taglist.vim plugin with D?

Ctags work for me (on XP), but I can't get taglist to work with D. It does work
with C/CPP files, but it seems to ignore D files.

I'm asking before I try to modify the plugin, because either I have ctags set
up wrong for D, or taglist simply won't work with D files, and there's a
function in there called "function! s:Tlist_Skip_File(filename, ftype)" which
looks tempting to modify. 

I can use ctags on D files already but not with the taglist plugin itself.

P.S. I've uploaded a new Ctags Windows binary on the prowiki page, and added
.di as another D file extension (i'll put up the patch later). I'm not sure how
up-to-date the D2 support is in that 5.8 patch, for example some template
functions are ignored in ctags. So I might update these soon.

http://prowiki.org/wiki4d/wiki.cgi?ReferenceForTools/ExuberantCtags
Dec 23 2010
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Got it working! I just needed to create an extra variable for
taglists. I'm using this:

let tlist_d_settings='d;c:classes;d:macro definitions;e:enumerators
(values inside an enumeration);f:function definitions;g:enumeration
names;l:local variables [off];m:class, struct, and union
members;M:module;n:namespaces;p:function prototypes [off];s:structure
names;t:typedefs;T:templates;u:union names;v:variable
definitions;x:external and forward variable declarations
[off];X:mixin;V:conditional compilation'

You can choose your own from the list ctags gives you with:
ctags --list-kinds=d

And more docs here: http://vim-taglist.sourceforge.net/extend.html

I'll add this to prowiki.

On 12/23/10, Andrej Mitrovic <none none.none> wrote:
 I know there's a few people here that use Vim, so has anyone succesfully
 used the taglist.vim plugin with D?

 Ctags work for me (on XP), but I can't get taglist to work with D. It does
 work with C/CPP files, but it seems to ignore D files.

 I'm asking before I try to modify the plugin, because either I have ctags
 set up wrong for D, or taglist simply won't work with D files, and there's a
 function in there called "function! s:Tlist_Skip_File(filename, ftype)"
 which looks tempting to modify.

 I can use ctags on D files already but not with the taglist plugin itself.

 P.S. I've uploaded a new Ctags Windows binary on the prowiki page, and added
 .di as another D file extension (i'll put up the patch later). I'm not sure
 how up-to-date the D2 support is in that 5.8 patch, for example some
 template functions are ignored in ctags. So I might update these soon.

 http://prowiki.org/wiki4d/wiki.cgi?ReferenceForTools/ExuberantCtags
Dec 23 2010
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 12/23/10, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 I'll add this to prowiki.
Done: http://prowiki.org/wiki4d/wiki.cgi?EditorSupport/VimEditor And it appears I was wrong because I can actually list template functions, I just didn't use a format specifier before.
Dec 23 2010