<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step.</td><td><code>3</code></td></tr>
<tr><td><code>scroll-lines</code></td><td>Number of lines to scroll per scroll wheel step</td><td><code>3</code></td></tr>
<tr><td><code>shell</code></td><td>Shell to use when running external commands.</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
<tr><td><code>shell</code></td><td>Shell to use when running external commands</td><td>Unix: <code>["sh", "-c"]</code><br/>Windows: <code>["cmd", "/C"]</code></td></tr>
<tr><td><code>line-number</code></td><td>Line number display: <code>absolute</code> simply shows each line's number, while <code>relative</code> shows the distance from the current line. When unfocused or in insert mode, <code>relative</code> will still show absolute line numbers.</td><td><code>absolute</code></td></tr>
<tr><td><code>line-number</code></td><td>Line number display: <code>absolute</code> simply shows each line's number, while <code>relative</code> shows the distance from the current line. When unfocused or in insert mode, <code>relative</code> will still show absolute line numbers</td><td><code>absolute</code></td></tr>
<tr><td><code>cursorline</code></td><td>Highlight all lines with a cursor.</td><td><code>false</code></td></tr>
<tr><td><code>cursorline</code></td><td>Highlight all lines with a cursor</td><td><code>false</code></td></tr>
<tr><td><code>cursorcolumn</code></td><td>Highlight all columns with a cursor.</td><td><code>false</code></td></tr>
<tr><td><code>cursorcolumn</code></td><td>Highlight all columns with a cursor</td><td><code>false</code></td></tr>
<tr><td><code>gutters</code></td><td>Gutters to display: Available are <code>diagnostics</code> and <code>diff</code> and <code>line-numbers</code> and <code>spacer</code>, note that <code>diagnostics</code> also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty</td><td><code>["diagnostics", "spacer", "line-numbers", "spacer", "diff"]</code></td></tr>
<tr><td><code>gutters</code></td><td>Gutters to display: Available are <code>diagnostics</code> and <code>diff</code> and <code>line-numbers</code> and <code>spacer</code>, note that <code>diagnostics</code> also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty</td><td><code>["diagnostics", "spacer", "line-numbers", "spacer", "diff"]</code></td></tr>
<tr><td><code>auto-completion</code></td><td>Enable automatic pop up of auto-completion.</td><td><code>true</code></td></tr>
<tr><td><code>auto-completion</code></td><td>Enable automatic pop up of auto-completion</td><td><code>true</code></td></tr>
<tr><td><code>auto-format</code></td><td>Enable automatic formatting on save.</td><td><code>true</code></td></tr>
<tr><td><code>auto-format</code></td><td>Enable automatic formatting on save</td><td><code>true</code></td></tr>
<tr><td><code>auto-save</code></td><td>Enable automatic saving on focus moving away from Helix. Requires <ahref="https://github.com/helix-editor/helix/wiki/Terminal-Support">focus event support</a> from your terminal.</td><td><code>false</code></td></tr>
<tr><td><code>auto-save</code></td><td>Enable automatic saving on the focus moving away from Helix. Requires <ahref="https://github.com/helix-editor/helix/wiki/Terminal-Support">focus event support</a> from your terminal</td><td><code>false</code></td></tr>
<tr><td><code>idle-timeout</code></td><td>Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant.</td><td><code>400</code></td></tr>
<tr><td><code>idle-timeout</code></td><td>Time in milliseconds since last keypress before idle timers trigger. Used for autocompletion, set to 0 for instant</td><td><code>400</code></td></tr>
<tr><td><code>completion-trigger-len</code></td><td>The min-length of word under cursor to trigger autocompletion</td><td><code>2</code></td></tr>
<tr><td><code>completion-trigger-len</code></td><td>The min-length of word under cursor to trigger autocompletion</td><td><code>2</code></td></tr>
<tr><td><code>auto-info</code></td><td>Whether to display info boxes</td><td><code>true</code></td></tr>
<tr><td><code>auto-info</code></td><td>Whether to display info boxes</td><td><code>true</code></td></tr>
<tr><td><code>true-color</code></td><td>Set to <code>true</code> to override automatic detection of terminal truecolor support in the event of a false negative.</td><td><code>false</code></td></tr>
<tr><td><code>true-color</code></td><td>Set to <code>true</code> to override automatic detection of terminal truecolor support in the event of a false negative</td><td><code>false</code></td></tr>
<tr><td><code>rulers</code></td><td>List of column positions at which to display the rulers. Can be overridden by language specific <code>rulers</code> in <code>languages.toml</code> file.</td><td><code>[]</code></td></tr>
<tr><td><code>rulers</code></td><td>List of column positions at which to display the rulers. Can be overridden by language specific <code>rulers</code> in <code>languages.toml</code> file</td><td><code>[]</code></td></tr>
<tr><td><code>bufferline</code></td><td>Renders a line at the top of the editor displaying open buffers. Can be <code>always</code>, <code>never</code> or <code>multiple</code> (only shown if more than one buffer is in use)</td><td><code>never</code></td></tr>
<tr><td><code>bufferline</code></td><td>Renders a line at the top of the editor displaying open buffers. Can be <code>always</code>, <code>never</code> or <code>multiple</code> (only shown if more than one buffer is in use)</td><td><code>never</code></td></tr>
<tr><td><code>color-modes</code></td><td>Whether to color the mode indicator with different colors depending on the mode itself</td><td><code>false</code></td></tr>
<tr><td><code>color-modes</code></td><td>Whether to color the mode indicator with different colors depending on the mode itself</td><td><code>false</code></td></tr>
<tr><td><code>git-global</code></td><td>Enables reading global .gitignore, whose path is specified in git's config: <code>core.excludefile</code> option.</td><td>true</td></tr>
<tr><td><code>git-global</code></td><td>Enables reading global <code>.gitignore</code>, whose path is specified in git's config: <code>core.excludefile</code> option</td><td>true</td></tr>
<tr><td><code>render</code></td><td>Whether to render whitespace. May either be <code>"all"</code> or <code>"none"</code>, or a table with sub-keys <code>space</code>, <code>nbsp</code>, <code>tab</code>, and <code>newline</code>.</td><td><code>"none"</code></td></tr>
<tr><td><code>render</code></td><td>Whether to render whitespace. May either be <code>"all"</code> or <code>"none"</code>, or a table with sub-keys <code>space</code>, <code>nbsp</code>, <code>tab</code>, and <code>newline</code></td><td><code>"none"</code></td></tr>
<tr><td><code>characters</code></td><td>Literal characters to use when rendering whitespace. Sub-keys may be any of <code>tab</code>, <code>space</code>, <code>nbsp</code>, <code>newline</code> or <code>tabpad</code></td><td>See example below</td></tr>
<tr><td><code>characters</code></td><td>Literal characters to use when rendering whitespace. Sub-keys may be any of <code>tab</code>, <code>space</code>, <code>nbsp</code>, <code>newline</code> or <code>tabpad</code></td><td>See example below</td></tr>
</tbody></table>
</tbody></table>
</div>
</div>
@ -351,7 +350,7 @@ tabpad = "·" # Tabs will look like "→···" (depending o
<tr><td><code>layout</code></td><td>A vector of gutters to display</td><td><code>["diagnostics", "spacer", "line-numbers", "spacer", "diff"]</code></td></tr>
<tr><td><code>layout</code></td><td>A vector of gutters to display</td><td><code>["diagnostics", "spacer", "line-numbers", "spacer", "diff"]</code></td></tr>
<tr><td><code>enable</code></td><td>Whether soft wrapping is enabled.</td><td><code>false</code></td></tr>
<tr><td><code>enable</code></td><td>Whether soft wrapping is enabled</td><td><code>false</code></td></tr>
<tr><td><code>max-wrap</code></td><td>Maximum free space left at the end of the line.</td><td><code>20</code></td></tr>
<tr><td><code>max-wrap</code></td><td>Maximum free space left at the end of the line</td><td><code>20</code></td></tr>
<tr><td><code>max-indent-retain</code></td><td>Maximum indentation to carry over when soft wrapping a line.</td><td><code>40</code></td></tr>
<tr><td><code>max-indent-retain</code></td><td>Maximum indentation to carry over when soft wrapping a line</td><td><code>40</code></td></tr>
<tr><td><code>wrap-indicator</code></td><td>Text inserted before soft wrapped lines, highlighted with <code>ui.virtual.wrap</code></td><td><code>↪ </code></td></tr>
<tr><td><code>wrap-indicator</code></td><td>Text inserted before soft wrapped lines, highlighted with <code>ui.virtual.wrap</code></td><td><code>↪ </code></td></tr>
<li>If you encounter errors when running Helix after switching branches, you may
<p>If you get errors when running after switching branches, you may have to update the tree-sitter grammars. Run <code>hx --grammar fetch</code> to fetch the grammars and <code>hx --grammar build</code> to build any out-of-date grammars.</p>
need to update the tree-sitter grammars. Run the command <code>hx --grammar fetch</code>
</li>
to fetch the grammars and <code>hx --grammar build</code> to build any out-of-date
<li>
grammars.</li>
<p>If a parser is segfaulting or you want to remove the parser, make sure to remove the compiled parser in <code>runtime/grammar/<name>.so</code></p>
<li>If a parser is causing a segfault, or you want to remove it, make sure to
</li>
remove the compiled parser located at <code>runtime/grammars/<name>.so</code>.</li>
<p>Textobjects that are language specific (<ahref="../usage.html#textobjects">like functions, classes, etc</a>)
<p>Helix supports textobjects that are language specific, such as functions, classes, etc.
require an accompanying tree-sitter grammar and a <code>textobjects.scm</code> query file
These textobjects require an accompanying tree-sitter grammar and a <code>textobjects.scm</code> query file
to work properly. Tree-sitter allows us to query the source code syntax tree
to work properly. Tree-sitter allows us to query the source code syntax tree
and capture specific parts of it. The queries are written in a lisp dialect.
and capture specific parts of it. The queries are written in a lisp dialect.
More information on how to write queries can be found in the <ahref="https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax">official tree-sitter
More information on how to write queries can be found in the <ahref="https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax">official tree-sitter
documentation</a>.</p>
documentation</a>.</p>
<p>Query files should be placed in <code>runtime/queries/{language}/textobjects.scm</code>
<p>Query files should be placed in <code>runtime/queries/{language}/textobjects.scm</code>
when contributing. Note that to test the query files locally you should put
when contributing to Helix. Note that to test the query files locally you should put
them under your local runtime directory (<code>~/.config/helix/runtime</code> on Linux
them under your local runtime directory (<code>~/.config/helix/runtime</code> on Linux
for example).</p>
for example).</p>
<p>The following <ahref="https://tree-sitter.github.io/tree-sitter/using-parsers#capturing-nodes">captures</a> are recognized:</p>
<p>The following <ahref="https://tree-sitter.github.io/tree-sitter/using-parsers#capturing-nodes">captures</a> are recognized:</p>
@ -172,8 +172,8 @@ for example).</p>
</tbody></table>
</tbody></table>
</div>
</div>
<p><ahref="https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+filename%3Atextobjects.scm&type=Code&ref=advsearch&l=&l=">Example query files</a> can be found in the helix GitHub repository.</p>
<p><ahref="https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+filename%3Atextobjects.scm&type=Code&ref=advsearch&l=&l=">Example query files</a> can be found in the helix GitHub repository.</p>
<h2id="queries-for-textobject-based-navigation"><aclass="header"href="#queries-for-textobject-based-navigation">Queries for Textobject Based Navigation</a></h2>
<h2id="queries-for-textobject-based-navigation"><aclass="header"href="#queries-for-textobject-based-navigation">Queries for textobject based navigation</a></h2>
<p><ahref="../usage.html#tree-sitter-textobject-based-navigation">Tree-sitter based navigation</a> is done using captures in the
<p>Tree-sitter based navigation in Helix is done using captures in the
following order:</p>
following order:</p>
<ul>
<ul>
<li><code>object.movement</code></li>
<li><code>object.movement</code></li>
@ -181,7 +181,7 @@ following order:</p>
<li><code>object.inside</code></li>
<li><code>object.inside</code></li>
</ul>
</ul>
<p>For example if a <code>function.around</code> capture has been already defined for a language
<p>For example if a <code>function.around</code> capture has been already defined for a language
in it's <code>textobjects.scm</code> file, function navigation should also work automatically.
in its <code>textobjects.scm</code> file, function navigation should also work automatically.
<code>function.movement</code> should be defined only if the node captured by <code>function.around</code>
<code>function.movement</code> should be defined only if the node captured by <code>function.around</code>
<ahref="https://github.com/helix-editor/helix/releases">GitHub Releases page</a>. Add the binary to your system's <code>$PATH</code> to use it from the command
line.</p>
<h2id="linux-macos-windows-and-openbsd-packaging-status"><aclass="header"href="#linux-macos-windows-and-openbsd-packaging-status">Linux, macOS, Windows and OpenBSD packaging status</a></h2>
<p>Helix is available for Linux, macOS and Windows via the official repositories listed below.</p>
<p>This will install the <code>hx</code> binary to <code>$HOME/.cargo/bin</code> and build tree-sitter grammars in <code>./runtime/grammars</code>.</p>
</blockquote>
<p>If you are using the musl-libc instead of glibc the following environment variable must be set during the build
<blockquote>
to ensure tree sitter grammars can be loaded correctly:</p>
<p>💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch
<p>Either set the <code>HELIX_RUNTIME</code> environment variable to point to the runtime files and add it to your <code>~/.bashrc</code> or equivalent:</p>
<p>To use Helix in desktop environments that supports <ahref="https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html">XDG desktop menu</a>, including Gnome and KDE, copy the provided <code>.desktop</code> file to the correct folder:</p>
sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
</code></pre>
</code></pre>
<p>For more information on the information displayed in the health check results refer to <ahref="https://github.com/helix-editor/helix/wiki/Healthcheck">Healthcheck</a>.</p>
<p>Tree-sitter grammars must be fetched and compiled if not pre-packaged.
Fetch grammars with <code>hx --grammar fetch</code> (requires <code>git</code>) and compile them
with <code>hx --grammar build</code> (requires a C++ compiler).</p>
<h3id="installing-language-servers"><aclass="header"href="#installing-language-servers">Installing language servers</a></h3>
<p>Language servers can optionally be installed if you want their features (auto-complete, diagnostics etc.).
Follow the <ahref="https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers">instructions on the wiki page</a> to add your language servers of choice.</p>
<tr><td><code>s</code><code><char></code></td><td>Surround current selection with <code><char></code></td><td><code>surround_add</code></td></tr>
<tr><td><code>s</code><code><char></code></td><td>Surround current selection with <code><char></code></td><td><code>surround_add</code></td></tr>
@ -382,7 +381,7 @@ it).</p>
<p>TODO: Mappings for selecting syntax nodes (a superset of <code>[</code>).</p>
<p>TODO: Mappings for selecting syntax nodes (a superset of <code>[</code>).</p>
<p>The following languages and Language Servers are supported. In order to use
<p>The following languages and Language Servers are supported. To use
Language Server features, you must first <ahref="https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers">install</a> the
Language Server features, you must first <ahref="https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers">install</a> the
appropriate Language Server.</p>
appropriate Language Server.</p>
<p>Check the language support in your installed helix version with <code>hx --health</code>.</p>
<p>You can check the language support in your installed helix version with <code>hx --health</code>.</p>
<p>Also see the <ahref="./languages.html">Language Configuration</a> docs and the <ahref="./guides/adding_languages.html">Adding
<p>Also see the <ahref="./languages.html">Language Configuration</a> docs and the <ahref="./guides/adding_languages.html">Adding
Languages</a> guide for more language configuration information.</p>
Languages</a> guide for more language configuration information.</p>
<h3id="file-type-detection-and-the-file-types-key"><aclass="header"href="#file-type-detection-and-the-file-types-key">File-type detection and the <code>file-types</code> key</a></h3>
<h3id="file-type-detection-and-the-file-types-key"><aclass="header"href="#file-type-detection-and-the-file-types-key">File-type detection and the <code>file-types</code> key</a></h3>
<p>Helix determines which language configuration to use with the <code>file-types</code> key
<p>Helix determines which language configuration to use based on the <code>file-types</code> key
from the above section. <code>file-types</code> is a list of strings or tables, for
from the above section. <code>file-types</code> is a list of strings or tables, for
<p>Minor modes are accessed by pressing a key (usually from normal mode), giving access to dedicated bindings. Bindings
<p>Minor modes are accessed by pressing a key (usually from normal mode), giving access to dedicated bindings. Bindings
can be modified or added by nesting definitions.</p>
can be modified or added by nesting definitions.</p>
@ -215,10 +212,8 @@ t = ":run-shell-command cargo test"
</tbody></table>
</tbody></table>
</div>
</div>
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
<p>Keys can be disabled by binding them to the <code>no_op</code> command.</p>
<p>Commands can be found at <ahref="https://docs.helix-editor.com/keymap.html">Keymap</a> Commands.</p>
<p>A list of commands is available in the <ahref="https://docs.helix-editor.com/keymap.html">Keymap</a> documentation
<blockquote>
and in the source code at <ahref="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a> at the invocation of <code>static_commands!</code> macro and the <code>TypableCommandList</code>.</p>
<p>Commands can also be found in the source code at <ahref="https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs"><code>helix-term/src/commands.rs</code></a> at the invocation of <code>static_commands!</code> macro and the <code>TypableCommandList</code>.</p>
<p>To use a theme add <code>theme = "<name>"</code> to your <ahref="./configuration.html"><code>config.toml</code></a>at the very top of the file before the first section or select it during runtime using <code>:theme <name></code>.</p>
<p>To use a theme add <code>theme = "<name>"</code> to the top of your <ahref="./configuration.html"><code>config.toml</code></a>file, or select it during runtime using <code>:theme <name></code>.</p>
<h2id="creating-a-theme"><aclass="header"href="#creating-a-theme">Creating a theme</a></h2>
<h2id="creating-a-theme"><aclass="header"href="#creating-a-theme">Creating a theme</a></h2>
<p>Create a file with the name of your theme as file name (i.e <code>mytheme.toml</code>) and place it in your <code>themes</code> directory (i.e <code>~/.config/helix/themes</code>). The directory might have to be created beforehand.</p>
<p>Create a file with the name of your theme as the file name (i.e <code>mytheme.toml</code>) and place it in your <code>themes</code> directory (i.e <code>~/.config/helix/themes</code> or <code>%AppData%\helix\themes</code> on Windows). The directory might have to be created beforehand.</p>
<p>The names "default" and "base16_default" are reserved for the builtin themes and cannot be overridden by user defined themes.</p>
<blockquote>
<p>The default theme.toml can be found <ahref="https://github.com/helix-editor/helix/blob/master/theme.toml">here</a>, and user submitted themes <ahref="https://github.com/helix-editor/helix/blob/master/runtime/themes">here</a>. </p>
<p>💡 The names "default" and "base16_default" are reserved for built-in themes
and cannot be overridden by user-defined themes.</p>
<p>where <code>key</code> represents what you want to style, <code>fg</code> specifies the foreground color, <code>bg</code> the background color, <code>underline</code> the underline <code>style</code>/<code>color</code>, and <code>modifiers</code> is a list of style modifiers. <code>bg</code>, <code>underline</code> and <code>modifiers</code> can be omitted to defer to the defaults.</p>
<p>Where <code>key</code> represents what you want to style, <code>fg</code> specifies the foreground color, <code>bg</code> the background color, <code>underline</code> the underline <code>style</code>/<code>color</code>, and <code>modifiers</code> is a list of style modifiers. <code>bg</code>, <code>underline</code> and <code>modifiers</code> can be omitted to defer to the defaults.</p>
<p>if the key contains a dot <code>'.'</code>, it must be quoted to prevent it being parsed as a <ahref="https://toml.io/en/v1.0.0#keys">dotted key</a>.</p>
<p>If the key contains a dot <code>'.'</code>, it must be quoted to prevent it being parsed as a <ahref="https://toml.io/en/v1.0.0#keys">dotted key</a>.</p>
<p>These keys match <ahref="https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme">tree-sitter scopes</a>.</p>
<p>These keys match <ahref="https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme">tree-sitter scopes</a>.</p>
<p>For a given highlight produced, styling will be determined based on the longest matching theme key. For example, the highlight<code>function.builtin.static</code> would match the key <code>function.builtin</code>rather than<code>function</code>.</p>
<p>When determining styling for a highlight, the longest matching theme key will be used. For example, if the highlight is<code>function.builtin.static</code>, the key <code>function.builtin</code>will be used instead of<code>function</code>.</p>
<p>We use a similar set of scopes as
<p>We use a similar set of scopes as
<ahref="https://www.sublimetext.com/docs/scope_naming.html">Sublime Text</a>. See also
<ahref="https://www.sublimetext.com/docs/scope_naming.html">Sublime Text</a>. See also
<p>These scopes are used for theming the editor interface.</p>
<p>These scopes are used for theming the editor interface:</p>
<ul>
<ul>
<li><code>markup</code>
<li><code>markup</code>
<ul>
<ul>
<li><code>normal</code>
<li><code>normal</code>
<ul>
<ul>
<li><code>completion</code> - for completion doc popup ui</li>
<li><code>completion</code> - for completion doc popup UI</li>
<li><code>hover</code> - for hover popup ui</li>
<li><code>hover</code> - for hover popup UI</li>
</ul>
</ul>
</li>
</li>
<li><code>heading</code>
<li><code>heading</code>
<ul>
<ul>
<li><code>completion</code> - for completion doc popup ui</li>
<li><code>completion</code> - for completion doc popup UI</li>
<li><code>hover</code> - for hover popup ui</li>
<li><code>hover</code> - for hover popup UI</li>
</ul>
</ul>
</li>
</li>
<li><code>raw</code>
<li><code>raw</code>
<ul>
<ul>
<li><code>inline</code>
<li><code>inline</code>
<ul>
<ul>
<li><code>completion</code> - for completion doc popup ui</li>
<li><code>completion</code> - for completion doc popup UI</li>
<li><code>hover</code> - for hover popup ui</li>
<li><code>hover</code> - for hover popup UI</li>
</ul>
</ul>
</li>
</li>
</ul>
</ul>
@ -475,7 +487,7 @@ berry = "#2A2A4D"
<tr><td><code>ui.statusline.insert</code></td><td>Statusline mode during insert mode (<ahref="./configuration.html#editor-section">only if <code>editor.color-modes</code> is enabled</a>)</td></tr>
<tr><td><code>ui.statusline.insert</code></td><td>Statusline mode during insert mode (<ahref="./configuration.html#editor-section">only if <code>editor.color-modes</code> is enabled</a>)</td></tr>
<tr><td><code>ui.statusline.select</code></td><td>Statusline mode during select mode (<ahref="./configuration.html#editor-section">only if <code>editor.color-modes</code> is enabled</a>)</td></tr>
<tr><td><code>ui.statusline.select</code></td><td>Statusline mode during select mode (<ahref="./configuration.html#editor-section">only if <code>editor.color-modes</code> is enabled</a>)</td></tr>
<tr><td><code>ui.statusline.separator</code></td><td>Separator character in statusline</td></tr>
<tr><td><code>ui.statusline.separator</code></td><td>Separator character in statusline</td></tr>
<tr><td><code>ui.popup</code></td><td>Documentation popups (e.g Space + k)</td></tr>
<tr><td><code>ui.popup</code></td><td>Documentation popups (e.g. Space + k)</td></tr>
<tr><td><code>ui.popup.info</code></td><td>Prompt for multiple key options</td></tr>
<tr><td><code>ui.popup.info</code></td><td>Prompt for multiple key options</td></tr>
<p>(Currently not fully documented, see the <ahref="./keymap.html">keymappings</a> list for more.)</p>
<!--toc:start-->
<p>See <ahref="https://github.com/helix-editor/helix/blob/master/runtime/tutor">tutor</a> (accessible via <code>hx --tutor</code> or <code>:tutor</code>) for a vimtutor-like introduction.</p>
<p>Vim-like registers can be used to yank and store text to be pasted later. Usage is similar, with <code>"</code> being used to select a register:</p>
<p>In Helix, registers are storage locations for text and other data, such as the
result of a search. Registers can be used to cut, copy, and paste text, similar
to the clipboard in other text editors. Usage is similar to Vim, with <code>"</code> being
<p>Helix allows you to create your own named registers for storing text, for
example:</p>
<ul>
<ul>
<li><code>"ay</code> - Yank the current selection to register <code>a</code>.</li>
<li><code>"ay</code> - Yank the current selection to register <code>a</code>.</li>
<li><code>"op</code> - Paste the text in register <code>o</code> after the selection.</li>
<li><code>"op</code> - Paste the text in register <code>o</code> after the selection.</li>
</ul>
</ul>
<p>If there is a selected register before invoking a change or delete command, the selection will be stored in the register and the action will be carried out:</p>
<p>If a register is selected before invoking a change or delete command, the selection will be stored in the register and the action will be carried out:</p>
<ul>
<ul>
<li><code>"hc</code> - Store the selection in register <code>h</code> and then change it (delete and enter insert mode).</li>
<li><code>"hc</code> - Store the selection in register <code>h</code> and then change it (delete and enter insert mode).</li>
<li><code>"md</code> - Store the selection in register <code>m</code> and delete it.</li>
<li><code>"md</code> - Store the selection in register <code>m</code> and delete it.</li>
<p>The system clipboard is not directly supported by a special register. Instead, special commands and keybindings are provided. Refer to the
<p>There is no special register for copying to system clipboard, instead special commands and keybindings are provided. See the <ahref="keymap.html#space-mode">keymap</a> for the specifics.
<ahref="keymap.html#space-mode">key map</a> for more details.</p>
The black hole register works as a no-op register, meaning no data will be written to / read from it.</p>
<p>The black hole register is a no-op register, meaning that no data will be read or written to it.</p>
<tr><td><code>md<char_to_delete></code></td><td>Delete the closest surround characters</td></tr>
</ul>
</tbody></table>
<p><code>ms</code> acts on a selection, so select the text first and use <code>ms<char></code>. <code>mr</code> and <code>md</code> work
</div>
on the closest pairs found and selections are not required; use counts to act in outer pairs.</p>
<p>You can use counts to act on outer pairs.</p>
<p>It can also act on multiple selections (yay!). For example, to change every occurrence of <code>(use)</code> to <code>[use]</code>:</p>
<p>Surround can also act on multiple selections. For example, to change every occurrence of <code>(use)</code> to <code>[use]</code>:</p>
<ul>
<ol>
<li><code>%</code> to select the whole file</li>
<li><code>%</code> to select the whole file</li>
<li><code>s</code> to split the selections on a search term</li>
<li><code>s</code> to split the selections on a search term</li>
<li>Input <code>use</code> and hit Enter</li>
<li>Input <code>use</code> and hit Enter</li>
<li><code>mr([</code> to replace the parens with square brackets</li>
<li><code>mr([</code> to replace the parentheses with square brackets</li>
</ol>
<p>Multiple characters are currently not supported, but planned for future release.</p>
<h2id="selecting-and-manipulating-text-with-textobjects"><aclass="header"href="#selecting-and-manipulating-text-with-textobjects">Selecting and manipulating text with textobjects</a></h2>
<p>In Helix, textobjects are a way to select, manipulate and operate on a piece of
text in a structured way. They allow you to refer to blocks of text based on
their structure or purpose, such as a word, sentence, paragraph, or even a
<p>💡 <code>f</code>, <code>c</code>, etc. need a tree-sitter grammar active for the current
document and a special tree-sitter query file to work properly. <ahref="./lang-support.html">Only
some grammars</a> currently have the query file implemented.
Contributions are welcome!</p>
</blockquote>
<h2id="navigating-using-tree-sitter-textobjects"><aclass="header"href="#navigating-using-tree-sitter-textobjects">Navigating using tree-sitter textobjects</a></h2>
<p>Navigating between functions, classes, parameters, and other elements is
possible using tree-sitter and textobject queries. For
example to move to the next function use <code>]f</code>, to move to previous
<p>For the full reference see the <ahref="./keymap.html#unimpaired">unimpaired</a> section of the key bind
documentation.</p>
<blockquote>
<p>💡 This feature relies on tree-sitter textobjects
and requires the corresponding query file to work properly.</p>
</blockquote>
<h2id="moving-the-selection-with-syntax-aware-motions"><aclass="header"href="#moving-the-selection-with-syntax-aware-motions">Moving the selection with syntax-aware motions</a></h2>
<p><code>Alt-p</code>, <code>Alt-o</code>, <code>Alt-i</code>, and <code>Alt-n</code> (or <code>Alt</code> and arrow keys) allow you to move the
selection according to its location in the syntax tree. For example, many languages have the
<p>NOTE: <code>f</code>, <code>c</code>, etc need a tree-sitter grammar active for the current
document and a special tree-sitter query file to work properly. <ahref="./lang-support.html">Only
some grammars</a> currently have the query file implemented.
Contributions are welcome!</p>
</blockquote>
<h2id="tree-sitter-textobject-based-navigation"><aclass="header"href="#tree-sitter-textobject-based-navigation">Tree-sitter Textobject Based Navigation</a></h2>
<p>Navigating between functions, classes, parameters, etc is made
possible by leveraging tree-sitter and textobjects queries. For
example to move to the next function use <code>]f</code>, to move to previous