D   A   T   A   W   O   K

Creation: December 29 2015
Modified: February 05 2022

CTAGS Reference

The ctags program generate an index (or a "tag") file for a variety of language objects found in file(s). This tag file allows these items to be quickly and easily located by a text editor or other utility. A "tag" signifies a language object for which an index entry is available.

To generate the tags recursively for a source directory

ctags -R <dir>

New tags can be appended to the current tag file "tags" file

ctags -R -a <dir>

To search for a specific tag and open Vim to its definition

vim -t <tag>


Once Vim is opened we can navigate the project using the following basic commands:

Auto completion

Provides smart autocompletion for programs. When invoked, the text before the cursor is inspected to guess what might follow. A popup menu offers word completion choices that may include struct and class members, system functions, and more.

Omni completion is not usually enabled by default. To turn on omni completion, add the following go vimrc

filetype plugin on
set omnifunc=syntaxcomplete#Complete

To use omni completion, type <C-x><C-o> while in Insert mode.


By default header files prototypes are not included in the tags file. Use the following options if you wish to index the prototypes as well.

ctags -R --c++-kinds=+p --fields=+S

Proudly self-hosted on a cheap Raspberry Pi