-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
-
How to…
- Collapse to single cursor after using multiple cursors / Keep only primary cursor
- Change cursor shape on mode change (bar cursor on insert mode, block on normal mode, etc)
- Map
jk
orjj
to exit insert mode - Map unicode characters like
ö
to keybinding - Use my terminal’s 16 color palette as a theme
- Perform find-and-replace
- Strip whitespace or format the buffer
- Access the Helix config directory
- Access the log file
- Add a language
- Change grammars at project level
- Close the LSP documentation popup
- General Questions
- Installation
- Common Issues
-
Use the default keybind
,
bound to thekeep_primary_selection
command.
-
Add this to your
config.toml
:[editor.cursor-shape] insert = "bar" normal = "block" select = "underline"
-
Add this to your
config.toml
:[keys.insert] j = { k = "normal_mode" }
-
The TOML standard requires that these characters are quoted:
[keys.normal] ö = "extend_line_up" # This line is invalid TOML "ö" = "extend_line_up" # This line is valid TOML
-
You can use color names like
red
,light-blue
, etc to refer to the terminal’s colors in a theme file; refer the theme color palette documentation.
-
Type
%
to select the entire file, thens
to bring up aselect:
prompt. Enter your search, and press enter. All matches in the file will be selected; you can now usec
to change them all simultaneously.
To make search fully case sensitive add the following to config.toml
:
[editor.search]
smart-case = false
If the LSP for the language is active and supports autoformat, and the auto-format option is on (check your and the repo’s languages.toml
), then this will happen on save. If there is an alternative command you can run in the terminal to format, you can pipe the whole buffer to it manually with %|<formatter><enter>
.
You can use :config-open
to open the config in Helix.
Platform |
Location |
Mac OS/Linux |
|
Windows |
|
Enable logging via the -v
flag, with each use (up to -vvv
) increasing the verbosity.
You can use :log-open
to open the log in Helix.
Platform |
Location |
Mac OS/Linux |
|
Windows |
|
You can specify custom grammars per-project/per-directory by placing the languages.toml
in .helix/languages.toml
at the root of your project. See https://docs.helix-editor.com/languages.html
-
Current status as of December 2022:
There’s two prototypes we’re exploring that could potentially exist side by side: a typed list/ML-like implementation for scripting and a Rust based interface for things that require performance. Could potentially run both in wasm but I’m personally a bit unhappy with how big wasm implementations are, easily several orders of magnitude compared to the editor
Originally posted in https://github.com/helix-editor/helix/discussions/3806#discussioncomment-4438007
-
Past discussions:
We shoot to cut a release around every two to three months. We use CalVer versioning, so if the current release is v22.08, it was released in August of 2022.
We are not interested in supporting alternative paradigms. The core of Helix’s editing is based on Selection → Action
, and it would require extensive changes to create a true Vi/Vim keymap. However, there is a third-party keymap: https://github.com/LGUG2Z/helix-vim
j
and k
are intentionally mapped to visual vertical movement. This is a more intuitive default that makes working with heavily soft-wrapped text (like this Markdown document) much easier. Textual vertical movement is bound to gk
and gj
. So you can use 3gj
and 3gk
instead of 3j
and 3k
to jump to a relative line number.
These commands are intentionally separate (with no special casing for count != 0
) as they represent the fundamental vertical movement primitives. All other vertical movement behavior can be created by combining these commands using conditions. For example:
(if (!= count 0) (move_line_up count) (move_vertical_line_up 0))
If these fundamental primitives had such special handling built in, that would limit what could be implemented. Furthermore, helix is slightly opinionated towards unsurprising and consistent behavior.
Ensure that you have mapped the Option key to ESC+
in the iTerm2 preferences via Preferences > Profiles > Keys