[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indexing c/c++ comments and text files
From: |
Michael Sullivan |
Subject: |
Re: Indexing c/c++ comments and text files |
Date: |
Thu, 29 Jul 2010 12:51:51 -0400 |
Did anyone have any thoughts about adding these two features -- I think
everyone could really benefit from them.
On 25-Jul-2010, at 8:04 AM, Michael Sullivan wrote:
> This is a message that was originally started on the help list, but it was
> recommended that the discussion move to the bug list as it contains a request
> for two features:
>
> Comment Indexing
> ----------------
> Comments in files parsed by the c/c++ parser (as identified in the langmap)
> are ignored. I'm wondering if it would be possible to add a command line
> option to not skip the symbols in comments.
>
> Text File Indexing
> ------------------
> Text files that potentially contain useful things to search for (e.g. MIB
> files) don't appear to have a parser (as identified in the langmap). I'm
> wondering if it would be possible to add a text parser that could be used to
> simply index every word in those files.
>
> Any thoughts?
>
> Begin forwarded message:
>
>> From: Michael Sullivan <address@hidden>
>>
>> Did anyone have any thoughts about adding these two features -- I think
>> everyone could really benefit from them.
>>
>> On 19-Jul-2010, at 9:55 PM, Michael Sullivan wrote:
>>
>>> I only cited id-utils in my first message so that you could see an example
>>> where another tags system had a capability that appears to be missing
>>> natively in global. However, I'm not actually trying to generate an
>>> id-utils database -- I consider the gtags/global database, tools, and
>>> output to be superior.
>>>
>>> Instead, I have two different problems that can be potentially solved in
>>> different ways:
>>>
>>> Comments
>>> --------
>>> ...
>>>
>>> Text Files
>>> ----------
>>> ...
>>>
>>> On 19-Jul-2010, at 9:24 PM, Shigio YAMAGUCHI wrote:
>>>
>>>> You can use the functions of id-utils by the -I option of gtags and global.
>>>> Is it insufficient?
>>>>
>>>>> I would like to instruct global/gtags to index c/c++ comments (and
>>>>> potentially other text files). For example, the following c++ comment
>>>>> text isn't currently indexed by global/gtags, but I would like it to be:
>>>>>
>>>>> // SOME_IMPORTANT_ENUM_1
>>>>> "Some corresponding text 1",
>>>>>
>>>>> // SOME_IMPORTANT_ENUM_2
>>>>> "Some corresponding text 2",
>>>>>
>>>>> etc.
>>>>>
>>>>> The comment text refers to symbols that are indexed elsewhere and I want
>>>>> a cross-reference search to return references to the comment lines above.
>>>>>
>>>>> When I used to use id-utils, I was able to achieve this by telling it
>>>>> that c/c++ files were actually text (e.g. set those extensions up to use
>>>>> the text parser in id-utils' langmap). Although I found a langmap
>>>>> setting in the .globalrc file, it doesn't appear to have a "text" parser.
>>>>>
>>>>> Is there a possibility of adding something like this?