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
Michael Davis 44d2fc2ab3
Commit an undo checkpoint before each write (#11062)
This fixes the modification indicator when saving from insert mode with
a config such as

    [keys.insert]
    C-s = ":write"

Previously the modification indicator would be stuck showing modified
even if the buffer contents matched the disk contents when writing after
some changes in insert mode with this binding. In insert mode we do not
eagerly write undo checkpoints so that all changes made become one
checkpoint as you exit insert mode. When saving, `Document`s `changes`
`ChangeSet` would be non-empty and when there are changes we show the
buffer as modified. Then switching to normal mode would append the
changes to history, bumping the current revision past what it was when
last saved. Since the last saved revision and current revision were then
unsynced, the modification indicator would always show modified.

This matches [Kakoune's behavior]. Kakoune has a different architecture
for writes but a very similar system for history, transactions and undo
checkpoints (what it calls "undo groups"). Upon saving Kakoune creates
an undo checkpoint if there are any uncommitted changes. It does this
after the write has gone through since its writing system is different.
For our writing system it's cleaner to make the undo checkpoint before
performing the save so that the history revision increments before we
send the save event.

[Kakoune's behavior]: 80fcfebca8/src/buffer.cc (L565-L566)
3 months ago
.cargo Add hook/event system 8 months ago
.github --- (#10798) 4 months ago
book Documentation: Convert links in the `.desktop` file to absolute paths (#11115) 3 months ago
contrib Fix ZSH completions (#11133) 3 months ago
docs Fix homebrew formula link (#11058) 3 months ago
helix-core build(deps): bump the rust-dependencies group with 5 updates (#11113) 3 months ago
helix-dap `&Option<T>` -> `Option<&T>` (#11091) 3 months ago
helix-event build(deps): bump the rust-dependencies group across 1 directory with 11 updates (#10715) 5 months ago
helix-loader `&Option<T>` -> `Option<&T>` (#11091) 3 months ago
helix-lsp `&Option<T>` -> `Option<&T>` (#11091) 3 months ago
helix-parsec use workspace inheritance for common version (#8925) 10 months ago
helix-stdx build(deps): bump the rust-dependencies group with 4 updates (#11032) 3 months ago
helix-term Commit an undo checkpoint before each write (#11062) 3 months ago
helix-tui build(deps): bump the rust-dependencies group with 4 updates (#11032) 3 months ago
helix-vcs build(deps): bump the rust-dependencies group with 5 updates (#11113) 3 months ago
helix-view Add changes for undo in insert mode (#11090) 3 months ago
runtime Add regex injections into bash (#11112) 3 months ago
xtask chore: remove unused xtask themelint (#10294) 6 months ago
.envrc direnv: Watch the rust-toolchain file (#8921) 10 months ago
.gitattributes Add .gitattributes (#3318) 2 years ago
.gitignore Remove vale from .gitignore 2 years ago
CHANGELOG.md typo (#10060) 6 months ago
Cargo.lock build(deps): bump the rust-dependencies group with 5 updates (#11113) 3 months ago
Cargo.toml Prevent improper files (like /dev/random) from being used as file arguments (#10733) 3 months ago
LICENSE Add the LICENSE file. 3 years ago
README.md Update README.md to add link to Kakoune and Neovim (#9119) 9 months ago
base16_theme.toml base16_default: add styles to newer unthemed features (#10858) 3 months ago
default.nix Expose all flake outputs through flake-compat (#10673) 5 months ago
flake.lock flake.lock: Bump flake inputs to prevent a warning message (#9816) 7 months ago
flake.nix in flake mkShell default RUSTFLAGS to an empty string if unset (#10880) 4 months ago
grammars.nix Make nix flake respect unused grammars (#9326) 9 months ago
languages.toml Update tree-sitter-todotxt (#11097) 3 months ago
logo.svg Reduce logo sizes even more (#9211) 9 months ago
logo_dark.svg Reduce logo sizes even more (#9211) 9 months ago
logo_light.svg Reduce logo sizes even more (#9211) 9 months ago
rust-toolchain.toml Bump MSRV to 1.74.0 5 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) 5 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!