On 19/06/09 06:33, Alessandro Antonello wrote:
>
>> On 16/06/09 05:03, Alessandro Antonello wrote:
>>>
>>> Hi, All!
>>>
>>> I know that commands like ':stselect' or ':stjump' will list all the tags
>>> that
>>> match and will split the window when one is chosen. But, most of the
>>> time I
>>> just need to check the signature of a function or the parameters I
>>> have to
>>> pass. List the tags in the command window isn't good since the
>>> signature of
>>> the function will disappear when I got back in '-- INSERT --' mode.
>>>
>>> There is a way to show the tags search result in a splited window or
>>> the
>>> quickfix window? Having the possibility of see the list of matches while
>>> I am
>>> writing is enough and quick for me.
>>>
>>> Regards,
>>> Alessandro Antonello
>>
>> If your Vim version is compiled with +cscope (and you have the cscope
>> program installed), you can use that to get lists of answers either in
>> the command window or as a quickfix list, your choice, and you can
>> choose separately for each possible kind of query.
>>
>> See ":help if_cscop.txt", and you may be interested in a recent thread
>> which I started on the vim_dev list, about using cscope with the Vim source.
>>
>>
>> Best regards,
>> Tony.
>> --
>
> Hi, Tony.
>
> I think I am missing something here. Or I am not quite understanding what
> the
> options are. I have the 'cscope' software installed and working. I have
> GVim
> configured and I have some databases made. But I still cannot get the
> result
> to be put in the quickfix window. The 'cscopequickfix' is set with all
> the
> options available plus the "-" sign.
>
> :set csqf=s-,g-,d-,c-,t-,e-,f-,i-
>
> When I type the command ':cs find s fopen' the file "stdio.h" is opened and
> the
> first match is shown in the command window. It shouldn't open the
> quickfix
> window with the list of matches found? Notice that this identifier is in
> a
> cscope database. If I use ':cst fopen' instead it doesn't find anything,
> the
> message "E257: cstag: tag not found" is shown at the command window.
Normally, a quickfix list is built and you are shown the first match in
the file that contains it. Use the following (or remap them) to see
other matches:
:cnext
:cprev
:cfirst
:clast
:cnfile
:cpfile
Or see the full list (one line per match) with
:copen
>
> If I use ':cs find s CStr::toAnsi' it does not find anything. The
> message
> "E259: no matches found for cscope query s of CStr::toAnsi" in the
> command
> window. But if I use ':cst CStr::toAnsi' it shows the list of matches in
> the
> command window. Notice that this identifier is in a tags file.
What is the reply to
:verbose set cst? csto?
I recommend setting 'cscopetag' on, this way tag commands and cscope
commands will be integrated.
If you have added that label to the source after you latest generated
the cscope database, you may need to rebuild it (by running cscope
outside of Vim). Then don't forget to reset your connection between Vim
and cscope to update the results.
>
> In none of the operations above the result is shown in a quickfix window.
> What
> am I missing here?
>
> -- Ale
To see a quickfix window, you have to open it. I rarely do: the
followings mappings (to go up and down between the results, in context)
are enough for me:
:map <F2> :cnext<CR>
:map <S-F2> :cprev<CR>
I also have the following, mostly to make cscope commands easier to type:
if has('cscope')
set cst csverb
if has('quickfix')
set csqf=s-,c-,d-,i-,t-,e-
endif
if version < 700
cnoreabbrev csf cs find
cnoreabbrev csk cs kill
cnoreabbrev css cs show
cnoreabbrev csh cs help
else
cnoreabbrev <expr> csf
\ ((getcmdtype() == ':' && getcmdpos() <= 4)?
\ 'cs find' : 'csf')
cnoreabbrev <expr> csk
\ ((getcmdtype() == ':' && getcmdpos() <= 4)?
\ 'cs kill' : 'csk')
cnoreabbrev <expr> css
\ ((getcmdtype() == ':' && getcmdpos() <= 4)?
\ 'cs show' : 'css')
cnoreabbrev <expr> csh
\ ((getcmdtype() == ':' && getcmdpos() <= 4)?
\ 'cs help' : 'csh')
endif
endif
Best regards,
Tony.
--
They spell it "da Vinci" and pronounce it "da Vinchy". Foreigners
always spell better than they pronounce.
-- Mark Twain
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---