Skip to content

Repository files navigation

GScope (Python GTK-3 frontend for CScope)

GScope is a simple GTK-3 frontend for cscope.

main-window

It uses ctags or gotags for local symbols lookup while global requests are managed by cscope.

Setup

To setup run sudo python3 setup.py install

Settings format

Settings are kept in json format in form of

{
"img": {
"close": "close.svg",
"locked": "locked.svg",
"unlocked": "unlocked.svg",
"icon": "gscope.svg"
},
"fonts": {
"source": "Droid Sans Mono 13"
},
"tags": {
".*\\.(go)": ["gotags", ["gotags"]],
".*\\.([cChH])": ["ctags", ["ctags", "--excmd=n", "-u", "-f", "-"]],
"*": ["ctags", ["ctags", "--excmd=n", "-u", "-f", "-"]]
},
"ui": {
"source-view-ratio": 0.65,
"tags-view-ratio": 0.20
},
"loglevel": 4,
"editor": ["gvim", "-R"]
}

where img key represent icons, fonts stays for font selection in source code viewer, tags are needed to parse local tags, ui stands for windows splitting ratio, loglevel for debug printouts (from 1 to 4) and editor for launching external editor on Ctl+e keypress inside source code view.

The default settings are shipped with the package itsels but may be overriden with -f path-to-file.json from command line.

Project format

The current project state can be opened and save via Project->Open or Project->Save respectively. An appropriate file format is the following

{
"version": "0.3",
"cwd": "/projects/kernel/linux-ml.git/",
"program": "GScope",
"entry": [
{
"action": "open",
"path": "kernel/kcmp.c"
},
{
"sym": "get_file_raw_ptr",
"action": "cscope",
"type": 10
},
{
"action": "open",
"path": "fs/eventpoll.c"
}
]
}

Keyboard shortcuts

ShortcutMeaning
Ctl+oOpen a file
Ctl+qExit the program
Ctl+eOpen current source file in editor
Ctl+rDo cscope reference request with the text selected
Ctl+dDo cscope definition request with the text selected
Ctl+OOpen a project
Ctl+SSave a project
Ctl+DClose a project

About

Python GTK-3 frontend for CScope

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages