Categories


Popular topics

UltraEdit and UEStudio support Ctags for both the active project and the active file. Exuberant ctags is a lightweight utility that generates an index (called a "tag file") of language objects in source code for a variety of different languages including C/C++, C#, HTML, Java, JavaScript, Lua, MATLAB, Perl, PHP, Python, Ruby, VHDL, and many more.

UltraEdit and UEStudio use a separate Ctags executable (ctags.exe) to generate the tag file. This exe is installed by default under the "GNU" folder in the main installation directory. However, you can also compile your own Ctags executable from the source and place it in this directory if you'd like.

Using Ctag integration in UltraEdit and UEStudio, you can generate this tag file directly from the editor, then use integrated Ctags functionality to quickly jump to class, function, variable, and other definitions in your source.

In order to use Ctags, you would need to:

  1. Have an open source file, or an open project containing source files, of one of the languages Ctags supports
  2. Generate the Ctags file by clicking Generate tags in the Project tab (or have Create Ctag file on project load checked in the Project settings dialog when the project is opened
  3. Place the caret on the instance of a symbol in a source file
  4. Click Find symbol in the Project tab or press F11 to do the same

Configuring Ctags

You can click the Ctag options button in the "Tags" group of the Project tab to configure Ctags. This will open a dialog where you can set the following options:

Default tag file
Use this to specify the location and name of the tag file to use if there isn't a specific project tag file active (defined in project settings). This must be set if there isn't a project-specific tag file set.

Ctag EXE path/name
Use this to set the full path and name of the ctags.exe that is used to create the tag file from within UltraEdit/UEStudio. If this isn't set, UltraEdit/UEStudio can still reference a tag file for symbols but cannot create one. The default setting for this is the "ctags.exe" in the "GNU" folder in the main installation directory.

Ctag parameters
Use this to set the parameters to be passed to the ctags.exe for it to function correctly. The default settings are -L %fi -f %fo. You can see all available parameters in the Exuberant Ctags documentation.

%fi on the parameter line represents the file path and name of a file that contains a list of files that the ctags.exe will use to create its tags from. If a project is loaded in UltraEdit, UltraEdit creates a temporary file with a list of the project files and passes this in place of %fi.

%fo on the parameter line represents the full file path and name of the tag file to be created. This would be the tag file set in the project, or the default tag file defined above.

Creating the tag file

You can create the tag file by clicking Generate tags in the Project tab (or have Create Ctag file on project load checked in the Project settings dialog when the project is opened.

Finding a symbol / tag

The purpose of Ctags is to be able to quickly find a class definition, function, or other object that is defined elsewhere in your source files. Assuming the tag file exists, clicking Find symbol' in the Project tab or pressing F11 to do the same will search the tag file for the symbol definition. If only one match is found, the file will be opened and the caret positioned on the symbol definition. If multiple matches occur, a list box will open, giving you the option to select and jump to the appropriate tag.

MediaWiki spam blocked by CleanTalk.