Skip to content
/ ntags Public
forked from zah/ntags

Mirror of Reimer Behrends's ntags repository

Notifications You must be signed in to change notification settings

ydm/ntags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTags

The ntags tool generates tags for Nim files, similar to how ctags generates tags for C/C files.

Installation

Use nimble build or make opt to build the release version, use make to build the debug version.

Usage

By default, ntags will scan all files and directories provided on the command line and will write tags to the tags file in the current directory. When scanning a directory, it will only parse files ending in .nim.

The -f <tagsfile> option can be used to specify a different tags file to output the tags to.

The -R or --recurse option can be used to tell ntags to recurse through any directories it encounters. By default, it will only check for .nim files at the top level of any directory encountered. This option only affects directories listed after it on the command line.

The --norecurse option turns off directory recursion for all subsequent directories.

Similarly, the -L and --follow options cause ntags to follow symbolic links, while --nofollow suppresses the behavior. The default is not to follow symbolic links.

The --fix-eol option will adjust the tag search patterns to deal with files that have lines that sometimes, but not always, end in \r by adding a \r\? at the end of the search pattern.

Limitations

The parser is still very simple. It can handle only top-level declarations.

In particular, it does not handle:

  • Declarations inside procedures.
  • Enum members.
  • Object fields.

It also does not handle inconsistent use of case/style. A future version should scan the files for all possible uses of an identifier and generate tags for all versions.

TAGS Format

https://ctags.sourceforge.net/FORMAT

About

Mirror of Reimer Behrends's ntags repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nim 97.5%
  • Makefile 2.0%
  • Shell 0.5%