CTags Plugin

Introduction

CTags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located using this plugin in Kate.

A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

Tag generation is supported for these programming languages.

Configuration

The CTags plugin uses two different database files for the index.

On the CTags settings page in Kate's configuration you can add or remove directories containing the source code and regenerate the common CTags database.

Common Index

Configure CTags Global Database

At the bottom of the settings page you can adapt the CTags command.

For more information about all available options please read the CTags man page. This man page is available in KHelpCenter and you can also enter the URL man:/ctags directly into Konqueror

Clicking Update will start indexing. When indexing is finished, close the dialog.

Session Index

To configure the session index open the CTags view.

Index Targets

On this tab you can add or remove directories containing the source code and manually regenerate the session specific CTags database.

Database
Configure CTags Session Database

Select another CTags database file, configure the CTags command or revert to the default command.

Using the CTags Plugin

You place the mouse cursor on the language object like function, symbol etc. that you are interested in and then select one of the actions in the CTags menu to jump to the line and file where the object is defined or declared.

By default the actions in the CTags menu have no shortcuts assigned. Use the keyboard shortcut editor to configure your own shortcuts.

Alternatively use the search field on the Lookup tab of the CTags view.

Entering characters into the search field will start the search and display matching names of language objects like functions, classes, symbols etc. together with type and filename.

Select an item in the list to jump to the corresponding line in the source file.

Menu Structure

CTagsJump back one step

Navigate back in the history to the last visited tag.

CTagsLookup Current Text

Opens the Lookup tab of the CTags view and displays all language objects matching the current text selection in the list.

CTagsGo to Declaration

If the cursor is in a definition object this will open the document containing the corresponding declaration if needed, activate its view and place the cursor at the start of the declaration.

CTagsGo to Definition

If the cursor is in a declaration object this will open the document containing the corresponding definition if needed, activate its view and place the cursor at the start of the definition.