Helix Mirror
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Rolo 6fbc85e168 feat(stdx): add `str` mod with `unescape` function
This commit introduces a `str` module and an `unescape` function to
`helix-stdx`, which processes escape sequences in strings and converts
them into their corresponding literal characters. The function handles a
variety of escape sequences, including:

- `\n` for newlines
- `\t` for tabs
- `\u{...}` for Unicode characters

The function does not unescape sequences like `\\` to `\`, leaving them
as they are. This opinionated behavior ensures that only certain escape
sequences are processed, and is built around user input, not general
input.

Given that its based around user input, a conservative approach was
taken for handling bad input, where if the string cannot be processed as
expected, it returns the original input.

Examples:
- Converting escaped newlines: `unescape("hello\\nworld")` results in
`"hello\nworld"`.
- Converting escaped tabs: `unescape("hello\\tworld")` results in
`"hello\tworld"`.
- Converting Unicode escape sequences:
`unescape("hello\\u{1f929}world")` results in `"hello🤩world"`.
- Handling invalid Unicode escape sequence:
`unescape("hello\\u{999999999}world")` results in the original
`"hello\\u{999999999}world"`.

The implementation also includes tests, but no gaurantees for edgecases.
5 months ago
.cargo Add hook/event system 10 months ago
.github --- (#10798) 6 months ago
book Fix multiple broken links in the documentation (#10953) 5 months ago
contrib Make Helix.appdata.xml spec-compliant (#10051) 8 months ago
docs use workspace inheritance for common version (#8925) 12 months ago
helix-core build(deps): bump the rust-dependencies group with 4 updates (#11032) 5 months ago
helix-dap Prevent improper files (like /dev/random) from being used as file arguments (#10733) 5 months ago
helix-event build(deps): bump the rust-dependencies group across 1 directory with 11 updates (#10715) 7 months ago
helix-loader Fix logic to update version when HEAD changes. (#10896) 6 months ago
helix-lsp Prevent improper files (like /dev/random) from being used as file arguments (#10733) 5 months ago
helix-parsec use workspace inheritance for common version (#8925) 12 months ago
helix-stdx feat(stdx): add `str` mod with `unescape` function 5 months ago
helix-term build(deps): bump the rust-dependencies group with 4 updates (#11032) 5 months ago
helix-tui build(deps): bump the rust-dependencies group with 4 updates (#11032) 5 months ago
helix-vcs --- (#10804) 6 months ago
helix-view build(deps): bump the rust-dependencies group with 4 updates (#11032) 5 months ago
runtime improve jump colors for github_dark themes (#10946) 5 months ago
xtask chore: remove unused xtask themelint (#10294) 8 months ago
.envrc direnv: Watch the rust-toolchain file (#8921) 1 year ago
.gitattributes Add .gitattributes (#3318) 2 years ago
.gitignore Remove vale from .gitignore 2 years ago
CHANGELOG.md typo (#10060) 8 months ago
Cargo.lock feat(stdx): add `str` mod with `unescape` function 5 months ago
Cargo.toml Prevent improper files (like /dev/random) from being used as file arguments (#10733) 5 months ago
LICENSE Add the LICENSE file. 4 years ago
README.md Update README.md to add link to Kakoune and Neovim (#9119) 11 months ago
base16_theme.toml base16_default: add styles to newer unthemed features (#10858) 5 months ago
default.nix Expose all flake outputs through flake-compat (#10673) 7 months ago
flake.lock flake.lock: Bump flake inputs to prevent a warning message (#9816) 9 months ago
flake.nix in flake mkShell default RUSTFLAGS to an empty string if unset (#10880) 6 months ago
grammars.nix Make nix flake respect unused grammars (#9326) 11 months ago
languages.toml add ruler at 101 and text-width at 100 to lean in languages.toml (#10969) 5 months ago
logo.svg Reduce logo sizes even more (#9211) 11 months ago
logo_dark.svg Reduce logo sizes even more (#9211) 11 months ago
logo_light.svg Reduce logo sizes even more (#9211) 11 months ago
rust-toolchain.toml Bump MSRV to 1.74.0 7 months ago
rustfmt.toml Add rustfmt.toml to force formatting to use rustfmt defaults 3 years ago
screenshot.png update screenshot (#1879) 3 years ago
shell.nix build(nix): update flake deps, add default.nix file 2 years ago
theme.toml Change cursor color per mode for default (#10608) 7 months ago

README.md

Helix

Build status GitHub Release Documentation GitHub contributors Matrix Space

Screenshot

A Kakoune / Neovim inspired editor, written in Rust.

The editing model is very heavily based on Kakoune; during development I found myself agreeing with most of Kakoune's design decisions.

For more information, see the website or documentation.

All shortcuts/keymaps can be found in the documentation on the website.

Troubleshooting

Features

  • Vim-like modal editing
  • Multiple selections
  • Built-in language server support
  • Smart, incremental syntax highlighting and code editing via tree-sitter

It's a terminal-based editor first, but I'd like to explore a custom renderer (similar to Emacs) in wgpu or skulpin.

Note: Only certain languages have indentation definitions at the moment. Check runtime/queries/<lang>/ for indents.scm.

Installation

Installation documentation.

Packaging status

Contributing

Contributing guidelines can be found here.

Getting help

Your question might already be answered on the FAQ.

Discuss the project on the community Matrix Space (make sure to join #helix-editor:matrix.org if you're on a client that doesn't support Matrix Spaces yet).

Credits

Thanks to @jakenvac for designing the logo!