~emg/vis-cscope

cscope interface for the vis editor
refactor, use <C-/>, respect !, limit filenames
Fix luacheck warnings
Keep to 80 columns (with tabwidth=8)

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~emg/vis-cscope
read/write
git@git.sr.ht:~emg/vis-cscope

You can also use your local clone with git send-email.

vis-cscope
==========

vis-cscope implements a cscope[0] interface for the vis editor[1].
It offers similar usage to the vim cscope plugin[2].  This plugin
performs a one off line orient search every time.  It does not keep
a cscope process alive in the background.  While this makes the
implementation simpler it does mean that the entire cscope database
is read for every search.

fields
------

0 s Find this C symbol:
1 g Find this global definition:
2 d Find functions called by this function:
3 c Find functions calling this function:
4 t Find this text string:
    Change this text string:
6 e Find this egrep pattern:
7 f Find this file:
8 i Find files #including this file:
9 a Find assignments to this symbol:

queries
-------

To find the global definition of a symbol, e.g. myfunc:

	:cscope g myfunc

or

	:cs g myfunc

or place the cursor over the word myfunc and

	<C-/>g

or

	<C-]>

The <C-/> binding is used for the similarity to using / for search.
The <C-]> binding is to emulate ctags usage.  Because <C-/> is reported
as <C-_>, <C-_> and <C--> work as well.  The plugin does not use <C-\>
as vim's plugin does because vis currently does not handle <C-\> when
built with curses.

To search for other fields use the one character field abbreviations
from the fields section. E.g. to find all assignments to myvar:

	:cs a myvar

or place the cursor over the word myvar and

	<C-/>a

In normal mode the query is the word text object the primary cursor
is on.  In visual mode the query is the text of the primary selection.

If only one result is returned, it is jumped to.  Otherwise results are
fed through vis-menu[3] for selection.

To jump back to a previous position use:

	:pop

or

	<C-t>


cscope database
---------------

This plugin will search upwards from the current file being edited (or
PWD if no file is being edited) until it finds a file named cscope.out.
That file path is passed to cscope using the -f option.

This plugin can handle databases with absolute or relative paths.

other languages
---------------

Because this plugin uses cscope, it can also work with any code
indexers that can export to cscope format, e.g. starscope[4].

contributing
------------

Please report bugs, ask questions, give comments, and send patches to

	~emg/dev@lists.sr.ht

Please use git send-email[5] to send patches and remember to

	git config format.subjectPrefix 'PATCH vis-cscope'

before sending your patch as the mailing list is used for multiple
projects.

[0] http://cscope.sourceforge.net/
[1] https://github.com/martanne/vis
[2] http://cscope.sourceforge.net/cscope_vim_tutorial.html
[3] https://martanne.github.io/vis/man/vis-menu.1.html
[4] https://github.com/eapache/starscope
[5] https://git-send-email.io/