sponsor Vim development Vim logo Vim Book Ad

cscope quickfix : enables to use cscope with quickfix.

 script karma  Rating 121/43, Downloaded by 4128  Comments, bugs, improvements  Vim wiki

created by
k kino
 
script type
utility
 
description
Overview
-------------
This script enables to use cscope with quickfix.

Preparation
-----------------
You must prepare cscope and cscope database (cscope.out file).
cscope is a tag tool like ctags, but unlike ctags, it is a cross referencing tool.
If you don't know about cscope see:
:help cscope
http://cscope.sourceforge.net/
http://iamphet.nm.ru/cscope/ (Win32)

Feature 1
--------------
This script adds a command ":Cscope", which is very similar to ":cscope find" command. But, this ":Cscope" command can be used with quickfix, and isn't needed cscope connection. So, you don't have to install vim with --enable-cscope.

Feature 2
--------------
This script adds keymap macro as follows:
<C-\> s: Find this C symbol
<C-\> g: Find this definition
<C-\> d: Find functions called by this function
<C-\> c: Find functions calling this function
<C-\> t: Find this text string
<C-\> e: Find this egrep pattern
<C-\> f: Find this file
<C-\> i: Find files #including this file
"this" means <cword> or <cfile> on the cursor.

Feature 3
--------------
This script adds Tools and Popup menu as follows:
"Symbols": Find this C symbol
"Defines": Find this definition
"Calls": Find functions called by this function
"Globals": Find functions calling this function
"Texts": Find this text string
"Egrep": Find this egrep pattern
"File": Find this file
"Includes": Find files #including this file
"Update cscope.out"

Function
--------------
RunCscope({type}, {pattern} [,{file}])

Command
---------------
Cscope {type} {pattern} [{file}]

Variables
--------------
0: disable, 1: enable
g:Cscope_OpenQuickfixWindow (default: 1)
g:Cscope_JumpError (default: 1)
g:Cscope_Keymap (default: 1)
g:Cscope_PopupMenu (default: 0)
g:Cscope_ToolMenu (default: 1)
 
install details
Copy cscope_quickfix.vim file to plugin directory.
If you don't want to open quickfix window after :Cscope command, put a line in .vimrc like:
let Cscope_OpenQuickfixWindow = 0
If you don't want to jump first item after :Cscope command, put a line in .vimrc like:
let Cscope_JumpError = 0
If you want to use Popup menu for :Cscope command, put a line in .vimrc like:
let Cscope_PopupMenu = 1
If you don't want to use Tools menu for :Cscope command, put a line in .vimrc like:
let Cscope_ToolsMenu = 0
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
cscope_quickfix.vim 0.2 2003-12-29 6.0 k kino Add menus.
Enables to be back to the place before jumping with :crew.
cscope_quickfix.vim 0.1 2003-12-21 6.0 k kino Initial upload
ip used for rating: 216.73.216.208

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github