MTAGS(1)

πŸ“¦
version 22.01.8 Β· 3 versions
, in alpine 3.24

✨ mtags(1) β€” General Commands Manual, but make it cute ✨

okay bestie, welcome to the mtags(1) page from the General Commands Manual πŸ’… this is the whole vibe: tag files for Mercury source code, explained so you can actually use it. no cap, every flag is here.


🌸 NAME 🌸

mtags β€” generate tag files for Mercury source code πŸ¦‹


πŸŽ€ USAGE πŸŽ€

mtags [<options>] <source files>

πŸ’– DESCRIPTION πŸ’–

This script creates tags files for Mercury programs that can be used with Vi, Vim, Elvis or Emacs (depending on the options specified). It takes a list of filenames from the command line and produces a tags file for the Mercury declarations in those files. slay. ✨


🫢 NOTES 🫢

mtags is one of the development tools that are part of the Mercury distribution.

This manual page is limited to a brief summary. For further information see the Mercury User's Guide. that's the tea β˜•


πŸ‘‘ OPTIONS πŸ‘‘

With no options specified, mtags defaults to creating a vim-style tags file. This file format is backwards compatible with vi, but tags contain extra attributes that are used by vim. Duplicate tags are not removed.

  • -e, --emacs β€” Produce an emacs-style TAGS file. If this option is present, all other options are ignored. like, absolutely ignored, bestie πŸ’€
  • --vim, --ext β€” This option is the default, but is retained for backwards compatibility. This option is shorthand for --keep-duplicates --search-definitions --vim-extended-attributes.
  • --elvis β€” Produces an extended tags file in a format that will work with elvis 2.1+. This option is shorthand for --keep-duplicates --no-search-definitions --elvis-extended-attributes.
  • --traditional-vi β€” Produces a tags file that contains only information useful for traditional vi. This was the default in previous versions of mtags, but is no longer since vim-style tags files are backwards compatible with vi. You may want to use this option if you only use vi and you want to reduce the size of the tags file. However, we suggest you investigate vim since its tags support is far superior for languages such as Mercury which support overloading. This option is shorthand for --no-keep-duplicates --search-definitions --no-extended-attributes.
  • --simple β€” Produce a dumbed-down vi-style tags file that will work with versions of vim prior to 5.0, and versions of elvis prior to 2.1. These versions cannot handle multiple commands for a tag. This option is shorthand for --keep-duplicates --no-search-definitions --no-extended-attributes.
  • --keep-duplicates β€” Allow multiple definitions for a tag. This option is the default, but is retained for backwards compatibility.
  • --no-keep-duplicates β€” If a tag has multiple definitions, ignore all but the first. Also ignores typeclass instance tags.
  • --search-definitions β€” This option is on by default. Output extra ex commands which place the tag in the search buffer to allow the definition to be found by pressing n after a tag lookup. For predicate and function declarations this will attempt to find the clauses by searching for occurrences of the tag at the start of a line. For other declarations, just the tag itself will be placed in the search buffer.
  • --no-search-definitions β€” Do not output extra commands to allow searching for definitions.
  • --all-module-qualified-names β€” Generate tags for all fully or partially qualified names. The default is to generate tags only if they are reasonably short, which is currently defined as being 30 characters or less using . as the module name separator.
  • --no-module-qualified-names β€” Generate tags only for unqualified names.
  • --underscore-qualified-names β€” When generating tags for fully or partially module qualified names, generate tags using __ as well as . as the module name separator. The default is to use only . as module name separator.
  • --no-extended-attributes β€” Do not output the extra tag attributes for vim/elvis.
  • --extended-attributes, --vim-extended-attributes β€” This option is the default. Output extra attributes for each tag to say whether it is in the implementation or interface of the source file and to describe the kind of tag. Tag kinds used are: pred for predicate declarations, func for function declarations, type for type definitions, cons for type constructors, fld for field names, inst for inst definitions, mode for mode definitions, tc for typeclass declarations, tci for typeclass instance declarations, tcm for typeclass methods, tcim for typeclass instance methods. (Vim assumes that the kind attribute has at most 4 characters.)
  • --elvis-extended-attributes β€” Output extra attributes as for --vim-extended-attributes, but in the format required by elvis.
  • --debug β€” Output the name of each source file as it is being processed to standard error.
  • -h, --help β€” Display this help message and exit.
  • -- β€” Treat all remaining arguments as source file names. This is useful if you have file names starting with -.

🌈 AUTHORS 🌈

The Mercury team. iconic πŸ’œ


This program and its documentation are copyright by the University of Melbourne and the Mercury team. They may be copied only under the terms of the GNU General Public License - see the file COPYING in the Mercury distribution.


🧚 SEE ALSO 🧚

The Mercury User's Guide.

<http://www.mercurylang.org/information/documentation.html>


πŸ’– sign-off from the Mercury Programmer's Manual, dated 2026-04-24 β€” mwah, bestie πŸ’–

πŸ“¦ where this page comes from