Module textredux.ctags
Displays a filtered list of symbols (functions, variables, …) in the current document using Exuberant Ctags.
Usage
In your init.lua:
local textredux = require 'textredux' keys.cg = textredux.ctags.goto_symbol -- Ctrl+G
Requirements
Exuberant Ctags needs to be installed and is available in the usual package managers.
Debian/Ubuntu:
sudo apt-get install exuberant-ctags
Homebrew on OS X:
brew install ctags
Note that it is possible to add support for additional filetypes in your
~/.ctags
, for example LaTeX:
--langdef=latex --langmap=latex:.tex --regex-latex=/\\label\{([^}]*)\}/\1/l,label/ --regex-latex=/\\section\{([^}]*)\}/\1/s,section/ --regex-latex=/\\subsection\{([^}]*)\}/\1/t,subsection/ --regex-latex=/\\subsubsection\{([^}]*)\}/\1/u,subsubsection/ --regex-latex=/\\section\*\{([^}]*)\}/\1/s,section/ --regex-latex=/\\subsection\*\{([^}]*)\}/\1/t,subsection/ --regex-latex=/\\subsubsection\*\{([^}]*)\}/\1/u,subsubsection/
This module is based on Mitchell's ctags code posted on the Textadept wiki.
Functions
goto_symbol () | Goes to the selected symbol in a filtered list dialog. |
Tables
styles | Mappings from Ctags kind to Textredux styles. |
Fields
CTAGS | Path and options for the ctags call can be defined in the CTAGS
field. |
Functions
- goto_symbol ()
- Goes to the selected symbol in a filtered list dialog. Requires ctags to be installed.
Tables
- styles
-
Mappings from Ctags kind to Textredux styles.
Fields:
- class
- enum
- enumerator
- [function]
- procedure
- method
- field
- member
- macro
- namespace
- typedef
- variable