man(1)

๐Ÿ“ฆ version 0.1.80, in debian trixie, ubuntu resolute, ubuntu stonking

chr ยท man(1) ยท the chr man page ยท manual section 1 ๐Ÿ’–

okay bestie, so this is the manual page for chr, and it lives in section 1 of the manual, and it is genuinely SO much. grab a snack ๐Ÿ“


๐Ÿ’– NAME ๐Ÿ’–

chr โ€” chr is a terminal based editor ๐Ÿ‘‘


โœจ SYNOPSIS โœจ

Usage: chr [options] [[+line[,char]] file โ€ฆ] [[+/searchword] file โ€ฆ] [/directory โ€ฆ]

๐ŸŒธ Options ๐ŸŒธ

  • -h, --help โ€” Displays help on commandline options.
  • --help-all โ€” Displays help including Qt specific options.
  • -v, --version โ€” Displays version information.
  • -l, --line-number โ€” The line numbers are displayed
  • -b, --big-file โ€” Open bigger files than 100MB
  • -w, --wrap-lines <WordWrap|WrapAnywhere|NoWrap> โ€” Wrap log lines (NoWrap Default)
  • --attributesfile <config> โ€” Safe file for attributes, default ~/.cache/chr/chr.json
  • -c, --config <config> โ€” Load customized config file. The default if it exist is ~/.config/chr
  • --syntax-highlighting-theme <name> โ€” Name of syntax-highlighting-theme, you can list installed themes with: kate-syntax-highlighter --list-themes
  • --disable-syntax โ€” disable syntax highlighting
  • -s, --size <N|auto> โ€” Size <N> in lines or <auto> for Automatic detection of the size of the lines with which the editor is displayed on the console.

๐Ÿซถ Arguments ๐Ÿซถ

  • [[+line[,char]] file โ€ฆ] โ€” Optional is the line number and position. Several files can be opened in multiple windows.
  • [[+/searchword] file โ€ฆ] โ€” A search word can be set.
  • [/directory โ€ฆ] โ€” Or a directory can be specified to search in the open dialog.

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

Chr is a terminal based text editor. no cap, that's the whole vibe.

Keyboard shortcuts are similar to the default editors in Gnome, KDE and other desktop environments. This is to ease workflows alternating between GUIs and terminal. (they get you, they really do ๐Ÿ˜ญ)

The look and feel is a blend of modern GUI editors and late 90s PC text mode editors (e.g. Turbo Vision based or edit.com) adapted to fit into terminal based workflows. it's giving retro-meets-slay โœจ

๐Ÿš€ Quick Start โœจ

The important operations can be invoked from the menu. The menu can be opened with F10 or with Alt together with the highlighted letter of the menu item (e.g. Alt + f).

In dialogs Tab is used to navigate between the elements. Use F6 to navigate between windows/dialogs.

Text can be marked in most terminals with Shift + arrow key. Ctrl + c is used for copying. Paste with Ctrl + v.

Changes can be saved with Ctrl + s and the editor can be exited with Ctrl + q. iconic behaviour fr fr ๐Ÿ‘‘


โŒจ๏ธ SHORT CUTS โŒจ๏ธ

  • Shift + Cursor โ€” Selects text
  • Ctrl + a โ€” Selects all text in the document
  • Ctrl + c / Ctrl + Insert โ€” Copies the selected text into the clipboard
  • Ctrl + d โ€” Deletes the current line
  • Ctrl + e, up/down/left/right โ€” Switches the active window. Use the arrow keys to specify the direction for the next active window.
  • Ctrl + e, Ctrl + up/down/left/right โ€” Change window size
  • Ctrl + e, q โ€” Close an active document
  • Ctrl + f โ€” Open the search dialog
  • Ctrl + Backspace โ€” Delete a word (left from cursor position)
  • Ctrl + r โ€” Open the replace dialog
  • Ctrl + n โ€” Creates a window with an empty document
  • Ctrl + m โ€” Creates a line marker at the left edge of the line to find lines again. (Ctrl + , oder Ctrl + .) This key combination does not work with all terminals.
  • Ctrl + q โ€” Quits the editor
  • Ctrl + Shift + q โ€” Close an active document (the key combination does not work in vte, see: Ctrl + e, q)
  • Ctrl + s โ€” Save (or save as for new documents)
  • Ctrl + v / Shift + Insert โ€” Inserts the contents of the clipboard at the current cursor position.
  • Ctrl + x / Shift + Delete โ€” Cuts out the selected text and moves it to the clipboard
  • Ctrl + y โ€” Redos an action that has been undone
  • Ctrl + z โ€” Undoes an action
  • Ctrl + Shift + up โ€” Moves the current selection or line upwards
  • Ctrl + Shift + down โ€” Moves the current selection or line down
  • Ctrl + Left โ€” Jump a word to the left
  • Ctrl + Shift + Left โ€” Selects a word to the left
  • Ctrl + Right โ€” Jump a word to the right
  • Ctrl + Shift Right โ€” Selects a word to the right
  • Alt + - โ€” Open the window menu
  • Alt + Shift + up/down/left/right โ€” Marks the text in blocks. Inserting the clipboard duplicates the text per line. If an equal number of lines is marked as to be inserted, the lines from the clipboard will be distributed across the selected lines.
  • Alt + Shift + S โ€” Sort the selected lines (lexicographical by code-point)
  • Alt + x โ€” Opens a command line. Type "help" for help.
  • Tab / Shift + Tab โ€” Indents a selected block by a tab stop or remove one level of indention
  • F3 / Shift + F3 โ€” Find the next or previously search element
  • F4 โ€” Toggles the selection mode to allow selecting text in terminals where marking with Shift + arrow keys does not work
  • F6 / Shift + F6 โ€” Change active window, with Shift in reverse order
  • ESC โ€” Closes an active dialog menu or action.
there are SO many shortcuts and honestly? every single one of them is a little gift ๐ŸŽ€

๐Ÿ“ File

๐Ÿ†• New

Opens a new an empty unnamed document.

๐Ÿ“‚ Open

Opens a file dialog to select a file to be opened.

๐Ÿ’พ Save

Saves the current status of the file. If the save path is not yet specified, the "Save as ..." dialog is opened.

๐Ÿ“ Save as...

A storage location to save the file to can be selected here via a file dialog.

๐Ÿ”„ Reload

Reloads the current file. All changes are discarded.

๐Ÿ™ˆ Close

Closes the active window.

๐Ÿ‘‹ Quit

Closes the editor. If there is a file open that has not yet been saved, the Save dialog will be opened first.

โœ๏ธ Edit

โœ‚๏ธ Cut, Copy, Paste, Select all

Text can be selected using the arrow keys while holding down the Shift key. The entire text can be selected with Select all. This selected text can then be copied using Copy or cut using Cut. With Paste, this text can be inserted again at the current cursor position. If there is text in the clipboard before copying (or cutting), it will be replaced.

These functions use an internal clipboard that contains different content than the clipboard used in the terminal as copy and paste commands, as the editor cannot access the system clipboard.

important bestie: internal clipboard โ‰  your terminal clipboard, they are two different girlies ๐Ÿ’…

๐Ÿ—‘๏ธ Delete Line

Deletes the entire line.

๐ŸŽฏ Select Mode

Toggles the selection mode to allow selecting text in terminals where marking with Shift + arrow keys does not work.

โ†ฉ๏ธ Undo, Redo

With Undo or CTRL + z, edits can be undone. With Redo or CTRL + y the undo can be undone again.

Use Search or Ctrl + f to open the search dialog. Enter a search term in the "Find" field. You can refine the search using the options. If live search is activated, the first matching result is automatically selected while the search term is being entered. If the text document is active, you can press F3 to jump to the next result or Shift + F3 to jump to the previous result.

โญ๏ธ Search Next

Jump to the next match for the current search term.

โฎ๏ธ Search Previous

Jump to the previous match for the current search term.

๐Ÿ” Replace

With Replace or CTRL + r the Replace dialog is opened. Enter a search term in the "Find" field. In the field "Replace" the word to be inserted is specified. "Next" jumps to the next match for the current search term. With "Replace" the current match is replaced. With "All" all occurrences of the search term are replaced at once.

๐Ÿงš Insert Character...

Opens a dialog in which a character code (Unicode codepoint) of a special character to be inserted can be entered.

๐Ÿšช Goto

To jump to a line, open a Goto Line dialog under "Goto".

๐Ÿ“Œ Marker

Creates a line marker in the left margin to quickly find lines again when reviewing. Use Ctrl + , or Ctrl + . to jump to the next marker. On quit the list of markers is saved in chr.json, so that it can be restored when the file is opened.

๐Ÿ”ค Sort Selected Lines

Sort the selected lines (lexicographical by code-point).

๐ŸŽ€ Options ๐ŸŽ€

okay bestie, this is where the menu gets juicy ๐Ÿ’…

๐Ÿ“ Tab settings

This opens the Tab settings dialog. Here you can set up how a tab behaves. You can choose between a tab (\t) and a space. You can also set the width of the indention. The default settings can also be made in the ~/.config/chr file. Here you can specify: "tabsize=8" or "tab=false" for spaces. โœจ

๐Ÿ“ Line Number

Shows the line number on the left side of the editor. The default settings can also be made in the ~/.config/chr file. Here you can specify: "line_number=true". ๐Ÿซถ

๐ŸŽจ Formatting

In the Formatting dialog, "Formatting Characters", "Color Tabs" and "Color Spacs at end of line" can be switched on and off. ๐Ÿ’–

The "Formatting characters" marks spaces with a dot: "ยท", end of line (\n) with a "ยถ", and the end of the file with: "โ™ฆ". ๐Ÿฆ‹

With "Color Tabs" tabs are colorized. The tab border is made darker. ๐ŸŒˆ

"Color Spaces at end of line" is used to spaces mark at the end of the line in red. ๐Ÿ“

In the configuration file: ~/.config/chr the behavior can be influenced with the option "formatting_characters=true", "color_tabs=true", "color_space_end=true". โœจ

๐ŸŒ€ Wrap long lines

Selects if lines that are wider than the window are displayed clipped or wrapped. It can be wrapped at the word boundary or hard at the end of the line. This behavior can be influenced by the option "wrap_lines=WordWrap" or "wrap_lines=WrapAnywhere" in the ~/.config/chr file. ๐Ÿ’ซ

In addition, the option "Display Right Margin at Column" can be used to specify a numerical value above which the background color is darkened. This value can also be set with the configuration option: "right_margin_hint=80" in ~/.config/chr. ๐Ÿ‘‘

๐Ÿ›‘ Stop Input Pipe

Reading from a pipe is interrupted. The standard input file descriptor is closed. ๐Ÿšซ

๐ŸŒธ Highlight Brackets

If active and the cursor is on a bracket the bracket at the cursor position and the matching other bracket are highlighted. The following opening and closing brackets can be highlighted when the cursor moves over them. With the option "highlight_bracket=true" this behavior can be influenced in the ~/.config/chr. Supported bracket types are: [{(<>)}]. ๐Ÿ’…

๐ŸŒŸ Syntax Highlighting

If the editor has been compiled with the "SyntaxHighlighting" feature, syntax highlighting is generally available. The language is automatically detected when a file is opened and displayed in the status bar. If required, it can also be switched on and off or adjusted via the syntax highlighting dialog. Syntax highlighting can also be deactivated in this dialog. ๐Ÿงš

The theme can be customized via the command line switch "--syntax-highlighting-theme". The editor comes with the themes "chr-bluebg" and "chr-blackbg". If required, a theme from the list that can be displayed with "kate-syntax-highlighter --list-themes" can be used. With the option "syntax_highlighting_theme=chr-bluebg" the theme can be set in ~/.config/chr. ๐ŸŽ€

Syntax highlighting can be switched off via the command line using "--disable-syntax" when the editor is started. With the option "disable_syntax=true" the theme can be set in ~/.config/chr. ๐Ÿ’€

๐ŸŽญ Theme

It opens the dialog for selecting a theme. The Classic (blue) or the Dark (black and white) mode is available. With the option "theme=classic" or "theme=dark", this can be set in the ~/.config/chr. ๐ŸŒˆ

๐ŸชŸ Window ๐ŸชŸ

๐Ÿ”„ Next, Previous

Switches the active window, with Shift in reverse order. (See F6) ๐Ÿ”

๐Ÿ“ Tile Vertically, Horizontally, Fullscreen

Selects how multiple open documents are shown. ๐Ÿ–ฅ๏ธ

Vertical and horizontal distribute the available space across the documents. When Fullscreen is selected only one document is shown at once. (See F6) โœจ

โœจ CUSTOM CONFIG โœจ

The editor loads a configuration file from ~/.config/chr (if available). (If the environment variable $XDG_CONFIG_HOME is set, then from $XDG_CONFIG_HOME/chr) ๐Ÿ’–

In addition to the options documented above, the following options are available:

๐Ÿƒ eat_space_before_tabs

This option is only active if tab=false is set. ๐Ÿ‘€

If this option is active and the Tab key is pressed while the cursor is in the indentation at the beginning of a line, the indentation is extended to the next tab position. ๐ŸŒฑ

๐Ÿ“‚ attributes_file

Specifies the path of the file in which the cursor and scroll position of files opened in the past is saved. ๐Ÿ’พ

๐ŸŽ€ Default config ๐ŸŽ€

There is a default config (~/.config/chr) where the following options can be set.

attributes_file="/home/user/.cache/chr/chr.json"
color_space_end=false
color_tabs=false
disable_syntax=false
eat_space_before_tabs=true
formatting_characters=false
highlight_bracket=true
line_number=false
logfile=""
right_margin_hint=0
syntax_highlighting_theme="chr-bluebg"
tab=false
tab_size=4
theme="classic"
wrap_lines="NoWrap"

๐Ÿ“ FILES ๐Ÿ“

  • ~/.config/chr โ€” Your personal chr initializations. ๐Ÿ’–
  • ~/.cache/chr/chr.json โ€” History about the changed files. This is where cursor positions are stored. ๐Ÿ“

๐Ÿ› BUGS ๐Ÿ›

Errors in this software can be reported via the bugtracker on https://github.com/istoph/editor. ๐Ÿซถ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Christoph Hรผffelmann <chr@istoph.de> Martin Hostettler <textshell@uchuujin.de> ๐Ÿ’œ


okay that's the whole vibe, bestie โœจ this was man(1) for version 0.1.80, dated 06 Apr 2025 โ€” no cap, you're now a chr expert ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from