* Use tree like structure to store keymaps
* Allow multi key keymaps in config file
* Allow multi key keymaps in insert mode
* Make keymap state self contained
* Add keymap! macro for ergonomic declaration
* Add descriptions for editor commands
* Allow keymap! to take multiple keys
* Restore infobox display
* Fix keymap merging and add infobox titles
* Fix and add tests for keymaps
* Clean up comments and apply suggestions
* Allow trailing commas in keymap!
* Remove mode suffixes from keymaps
* Preserve order of keys when showing infobox
* Make command descriptions smaller
* Strip infobox title prefix from items
* Strip infobox title prefix from items
- switch to use static OnceCell to calculate Info once
- pass Vec<(&[KeyEvent], &str)> rather than Vec<(Vec<KeyEvent>, &str)>
- expr -> tt to allow using | as separator, make it more like match
* Enable using color palettes in theme files.
* Add an example theme defined using a gruvbox color palette.
* Fix clippy error.
* Small style improvement.
* Add documentation for the features to themes.md.
* Update runtime/themes/gruvbox.toml
Fix the value of purple0.
Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>
Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>
Fixes#378. The issue was that because indent style detection
ran before language detection, there was no language indent
style to fall back on if indent style detection failed, so it
would just default to 2 spaces.
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view
* fix tests
* clippy and format fixes
Co-authored-by: Keith Simmons <keithsim@microsoft.com>
This commit adds six new commands to interact with system clipboard:
- clipboard-yank
- clipboard-yank-join
- clipboard-paste-after
- clipboard-paste-before
- clipboard-paste-replace
- show-clipboard-provider
System clipboard provider is detected by checking a few environment
variables and executables. Currently only built-in detection is
supported.
`clipboard-yank` will only yank the "main" selection, which is currently the first
one. This will need to be revisited later.
Closes https://github.com/helix-editor/helix/issues/76
* Fix expansion of `~`, dont use directory relative to cwd.
* Add `expand_tilde`
* Bring back `canonicalize_path`, use `expand_tilde` to `normalize`
* Make `:open ~` completion work
* Fix clippy
* Fold home dir into tilde in Document `realitve_path`
This is necessary to workaround ownership issues across function calls.
The issue notably arised when implementing the registers into `Editor`
and I was getting annoyed again when implementing copy/pasting into
system clipboard.
The problem is addressed by using macro calls instead of function calls.
There is no notable side effect.
* Add convenience/clarity wrapper for Range initialization
* Add keycode parse and display methods
* Add remapping functions and tests
* Implement key remapping
* Add remapping book entry
* Use raw string literal for toml
* Add command constants
* Make command functions private
* Map directly to commands
* Match key parsing/displaying to Kakoune
* Formatting pass
* Update documentation
* Formatting
* Fix example in the book
* Refactor into single config file
* Formatting
* Refactor configuration and add keymap newtype wrappers
* Address first batch of PR comments
* Replace FromStr with custom deserialize
Adds `ui.linenr.selected` which controls highlight of linu numbes which
have cursors on.
- Fallback to linenr if linenr.selected is missing
- Update docs and themes
- Add TODOs for themes with temporary linenr.selected
Registers are stored inside `Editor` and accessed without `RwLock`.
To work around ownership, I added a sister method to `Editor::current`:
`Editor::current_with_context`. I tried to modify `Editor::current`
directly but it's used at a lot of places so I reverted into this for
now at least.
- Move char functions into their own module under helix_core.
- Use matches!() macro where appropriate.
- Use a static lifetime on indent_unit() now that we can.
* add alternate file
inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view
* apply feedback from #223
* rename to last_accessed
* add ga doc
* add fail message for ga