LinuxCommandLibrary

hx

Inspect and edit binary files

TLDR

View documentation for the original command

$ tldr helix
copy

SYNOPSIS

hx [OPTIONS] [FILE...]
hx [SUBCOMMAND]

PARAMETERS

-c, --config FILE
    Specifies an alternative path to the configuration file, overriding the default.

-f, --force-tui
    Forces the terminal user interface (TUI) mode, even if stdout is not a TTY (e.g., when piping).

-g, --log FILE
    Specifies a path for logging editor activities and debugging information.

-s, --session FILE
    Specifies a path for the editor session file, allowing sessions to be loaded or saved.

-h, --help
    Displays the help message and available command-line options.

-V, --version
    Prints the Helix editor version information to standard output.

DESCRIPTION

hx is the command-line interface for the Helix text editor, a powerful and modern editor inspired by Vim and Kakoune. It emphasizes a "modal" editing paradigm where commands are executed by first selecting text and then applying an action. Unlike traditional Vim, Helix is "select-then-act" focused. It's built with Rust, making it fast and memory-safe.

Key features include built-in Language Server Protocol (LSP) integration for intelligent code completion and diagnostics, multiple selections, and syntax highlighting powered by Tree-sitter. It aims to provide an out-of-the-box, batteries-included editing experience without extensive plugin configuration, making it a compelling alternative for developers seeking a modern, efficient, and highly configurable text editing environment.

CAVEATS

hx is a text editor designed primarily for interactive use and is not typically suitable for non-interactive scripting without specific subcommands.
Its configuration is written in TOML, which differs from configuration formats used by editors like Vim (Vimscript) or Emacs (Emacs Lisp).
Helix is a relatively new editor and may not be pre-installed on all Linux distributions. Users might need to install it manually or via their distribution's package manager.
While inspired by Vim, its core "select-then-act" modal editing paradigm differs significantly from Vim's "command-then-motion" approach.

SUBCOMMANDS

hx supports several useful subcommands for specific tasks:

  • --health: Checks the status of the editor and its configured language servers, useful for debugging LSP issues.
  • --config-loader: Parses and prints the merged configuration, aiding in configuration debugging.
  • --tutor: Launches an interactive tutorial directly within the editor, ideal for new users to learn basic commands.
  • --themes: Lists all available syntax highlighting themes that can be used in the editor's configuration.
  • --grammars: Lists all available Tree-sitter grammars, which provide accurate syntax parsing for various languages.
  • --debug-tree FILE: Prints the syntax tree for a specified file, useful for grammar development and understanding parsing.
  • --debug-language-server SERVER_NAME FILE: Allows debugging a specific language server's interaction with a file.
  • --build-info: Displays detailed build information about the Helix editor, including version and compile-time features.

BASIC USAGE

To open an existing file, simply type hx filename. If the specified file does not exist, Helix will create a new buffer for it, and the file will be saved upon writing. To start a new empty buffer without immediately associating it with a file, just type hx.

HISTORY

The Helix editor began development around 2020 by the community, primarily driven by core developer `pascalkuthe`. It was conceived as a modern, Rust-based editor aiming to combine the best aspects of Vim's modal editing and Kakoune's "select-then-act" paradigm, along with built-in LSP and Tree-sitter support. Its rapid development and opinionated defaults quickly attracted a strong following, positioning it as a powerful alternative to established editors for developers seeking a fast, efficient, and well-integrated coding experience without extensive plugin management.

SEE ALSO

vim(1), nvim(1), kak(1), emacs(1), nano(1), micro(1)

Copied to clipboard