ctags ignore lists for libc6, libstdc++ and boost

后端 未结 4 686
独厮守ぢ
独厮守ぢ 2020-12-29 22:05

I use ctags with vim and the OmniCppComplete plugin. Currently when generating my tags I do it individually for each library. For libc6 I use the following list of tokens

4条回答
  •  青春惊慌失措
    2020-12-29 22:34

    You can also use the modified libstdc++ library:

    http://www.vim.org/scripts/script.php?script_id=2358

    This contains a stripped version of the C++ header files which works for ctags.

    I made a Python script that extracts all tags beginning with an underscore from a tags file. You can choose with this script which tags to exclude. Feel free to tailor the script to meet your needs or suggest anything else:

    import re
    
    tags=open('tags','r')
    output=open('exclude','w')
    regex=re.compile('^_[a-zA-Z0-9_]*')
    results=set()
    
    for line in tags:
        result=regex.match(line)
        if(result!=None):
            results.add(result.group(0))
    
    tags.close()
    
    for element in sorted(results):
        output.write('{0}\n'.format(element))
    
    output.close()
    

提交回复
热议问题