2009-09-24 13 views

cevap

3

Coşkulu ctags, zaten Erlang için tag field "modülünü" desteklemektedir.

yeccgoto_const xref_parser.erl /^yeccgoto_const(24=_S, Cat, Ss, Stack, T, Ts, Tzr) ->$/;"  f  module:xref_parser 

Aslında, şimdilik bu etiket alanını desteklemiyor VIM geçerli: gibi

$ /usr/bin/ctags --version 
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert 
    Compiled: Aug 17 2010, 17:33:33 
    Addresses: <[email protected]>, http://ctags.sourceforge.net 
    Optional compiled features: +wildcards, +regex 
$ /usr/bin/ctags xref_parser.erl 

"modül" adlı bir etiket alanına sahip tipik bir etiket çizgisi görünüyor. VIM doc Gönderen: bu kadar

{field} .. A list of optional fields. Each field has the form: 

      <Tab>{fieldname}:{value} 

     The {fieldname} identifies the field, and can only contain 
     alphabetical characters [a-zA-Z]. 
     The {value} is any string, but cannot contain a <Tab>. 

     There is one field that doesn't have a ':'. This is the kind 
     of the tag. It is handled like it was preceded with "kind:". 
     See the documentation of ctags for the kinds it produces. 

     The only other field currently recognized by Vim is "file:" 
     (with an empty value). It is used for a static tag. 

. Sadece "tür" ve "dosya" etiket alanı isimlerini desteklemektedir.

+0

Bu araç modülü üretir: Erlang dosyaları için Vim'in kullanabileceği şekilde işlev etiketleri: https://github.com/vim-erlang/vim-erlang-tags – hcs42

1

Erlang etags modülünü kullanmıyormuşsunuz gibi geliyor: Generate Emacs TAGS file from Erlang source files.

+0

Etags Emacs içindir ve Vim kullanıyorum. – hcs42

+0

Düzeltme: Vim + emacs_tags özelliği ile derlendiğinde etags da kullanabilir. Ancak etags, modül niteleyicilerini de desteklemiyor gibi görünüyor. – hcs42

0

Ben bir 2 metin kullanıcısıyım ve bilgisayarımda ctags düzgün çalışıyor. ve ben yüce 2.


için ctags plugin kullanmak -> version

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert 
Compiled: Jul 24 2012, 11:45:55 
Addresses: <[email protected]>, http://ctags.sourceforge.net 
Optional compiled features: +wildcards, +regex 
3

LHT yazdığı gibi, Coşkulu Ctags 5.8 zaten etiketleri dosyasındaki fonksiyonunun modülü saklar ctags. En azından Vim'in son versiyonlarıyla (7.4) bu bilgilere erişilebilir. Özel bir "etiket" işlevini kullanarak "modül: işlev" e bakmak mümkündür, örneğin:

function! ErlangTag() 
    let isk_orig = &isk 
    set isk+=: 
    let keyword = expand('<cword>') 
    let &isk = isk_orig 
    let parts = split(keyword, ':') 
    if len(parts) == 1 
     execute 'tag' parts[0] 
    elseif len(parts) == 2 
     let [mod, fun] = parts 
     let i = 1 
     let fun_taglist = taglist('^' . fun . '$') 
     for item in fun_taglist 
      if item.kind == 'f' && item.module == mod 
       silent execute i . 'tag' fnameescape(item.name) 
       break 
      endif 
      let i += 1 
     endfor 
    endif 
endfunction 

nnoremap <buffer> <c-]> :call ErlangTag()<cr> 
İlgili konular