LinuxCommandLibrary

helpztags

Display help from tags files (ctags)

SYNOPSIS

helpztags [directory ...]

PARAMETERS

[directory ...]
    One or more directories containing doc/*.txt help files. Defaults to system Vim/Neovim doc paths if omitted.

DESCRIPTION

The helpztags command is a utility script included in many Linux distributions' Vim and Neovim packages (e.g., Arch Linux, Fedora). It automates the generation of compressed tag files (.tags.zst) for Vim help directories using zstd compression.

These tags enable faster loading and lower memory usage for Vim's :help system, especially beneficial with extensive documentation sets in Vim 9.1+ which supports compressed helptags natively.

Typically invoked post-installation or after doc updates, it launches Vim in non-interactive mode with :helptags on specified directories, then compresses the output. If no directories are provided, it often defaults to standard paths like /usr/share/vim/vimfiles/doc or /usr/share/nvim/runtime/doc.

Running it ensures optimal performance for :help navigation via tags, word searches, and index generation.

CAVEATS

Requires Vim/Neovim ≥9.1 with zstd support. Run as root (sudo) for system directories. Overwrites existing tags; backup if customized.

USAGE EXAMPLE

sudo helpztags /usr/share/vim/vim*/doc
helpztags ~/.local/share/nvim/runtime/doc

VERIFICATION

Check for .tags.zst files in doc dirs post-run. Test in Vim: :help tags or :echo helptags().

HISTORY

Introduced in Vim packaging around 2023 with Vim 9.1's compressed helptags feature (patch 9.1.0001+). Scripts vary by distro (e.g., Arch's shell wrapper since vim 9.x); enhances startup speed by 20-50% on large doc sets.

SEE ALSO

vim(1), nvim(1), zstd(1), helptags(vim)

Copied to clipboard