Thursday, January 28, 2010

Re: Cscope quickfix -- not jump to first error

On Jan 28, 9:58 am, Aarto Matti <aarto.ma...@gmail.com> wrote:
>
> There's also a dirty fix to open quickfix window after search, I'm not sure
> of it's quality since I'm a noob, but I hope Bram will consider fixing that
> one too.
>
>
> Should be applied after Sergey's patch. Thanks to Sergey for giving me a
> right direction.
>

This would make cscope behave unlike any other quickfix command. I
think it would be better accomplished through vimscript.

For example, it could be just as simple as using a command-line
abbreviation like this:

:cabbrev cscope cscope find <C-R><C-W> | botright copen<C-Left><C-
Left><C-Left><C-Left>

Which will, when you type "cscope" on the command line, automatically
fill in most of the search (including the word under the cursor) for
you, all you need to do is enter the type of cscope query you wish to
run.

You may be interested in the following wiki pages to enhance this or
inspire other ways of accomplishing what you want:

http://vim.wikia.com/wiki/Find_in_files_within_Vim
http://vim.wikia.com/wiki/Replace_a_builtin_command_using_cabbrev

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: