Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick start

A minute from now you will have found a definition in your own C project and followed its callers. You need Ripscope installed and a terminal open in the project.

1. Find a definition

Search for a function in your project. This example finds main.

ripscope -R -L -1 main

Ripscope indexes the C files here and in subdirectories, then prints one row for each definition, like this one:

main.c main 3 int main(void )

A row is the file, the function, the line number and the source line. Replace main with another function name to explore your code.

If you see ripscope: no source files found, the directory holds no C files. Change to your project directory and run the command again.

2. Find more code

Use the search that fits your question.

FindCommand
A definitionripscope -L -1 NAME
Callers of a functionripscope -L -3 NAME
Functions it callsripscope -L -2 NAME
Assignments to a variableripscope -L -9 NAME

Replace NAME with a function or variable from your project. You only need -R the first time, because the index remembers which files you chose. Every search brings the index up to date with your edits before it answers. Queries describes all nine searches.

3. Search from your editor

With the installer or one plugin-manager line, open a C file in your project and search: :cs find g main in Vim, :RipscopeFind g main in Neovim, or M-. on main in Emacs. The first search indexes the project into your cache directory, and later searches see your saved edits. The Vim, Neovim and Emacs guides explain how the project is found and how to select sources with a file list.

Next steps