aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
Commit message (Collapse)AuthorAge
* Add `:theme <name>` commandwojciechkepka2021-06-19
|
* Revert "Refactor key into helix-view"Blaž Hrastnik2021-06-19
| | | | | | Did not use defaults when custom keymap was used This reverts commit ca806d4f852e934651132fc9570a6110e30f646d.
* Refactor key into helix-viewIvan Tham2021-06-19
| | | | Now also make use of Deserialize for Config.
* Fix indent regression issue with o, OGokul Soumya2021-06-18
| | | | | | | Indents were no longer respected with `o` and `O`. Using counts resulted in multiple cursors in the same line instead of cursors on each line. Introduced by 47d2e3ae
* Add `work_done_token` as parameter to lsp methodswojciechkepka2021-06-18
|
* Fix expansion of `~` (#284)Wojciech Kępka2021-06-18
| | | | | | | | | | | | | * 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`
* Replace `Editor::current` by a macroBenoît CORTIER2021-06-18
| | | | | | | | | 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.
* Configurable keys 2 (Mapping keys to commands) (#268)PabloMansanet2021-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Let o, O take counts for multiple cursorsGokul Soumya2021-06-17
|
* Fix cursor position bugs related to o and OGokul Soumya2021-06-17
| | | | | | | - `O` at the beginning of file didn't move cursor - `o` and `O` messed up cursor position with multiple cursors Fixes #127
* Remove RwLock for registersBenoît CORTIER2021-06-15
| | | | | | | | 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.
* Use `_impl` suffix instead of `_` prefixBenoît CORTIER2021-06-15
| | | | | | Helpers / internal implementations where using the `_` prefix. However, this prefix also suppress unused warnings. I suggest we use the `_impl` suffix instead.
* Remove unused variablesIvan Tham2021-06-15
|
* Report indent style when calling indent-style with no arguments.Nathan Vegdahl2021-06-15
| | | | Also print an error message when the argument is malformed.
* Address PR comments.Nathan Vegdahl2021-06-15
| | | | | | * Clean up "indent-style" command argument parsing. * Adjust command's name to match the style of other commands. * Add a "0" alias to the command, for tabs indent style.
* Implement command to change the indent-style setting of a document.Nathan Vegdahl2021-06-15
|
* fix: wq/wqa functions need to wait for save to finish before closingBlaž Hrastnik2021-06-14
|
* fix offset by one problem in replace_with_yankedAndreas Liljeqvist2021-06-14
|
* Fix `wq`Wojciech Kępka2021-06-13
|
* Fix clippyWojciech Kępka2021-06-13
|
* Deduplicate codeWojciech Kępka2021-06-13
|
* Add `qa` and `qa!`Wojciech Kępka2021-06-13
|
* Update write_allWojciech Kępka2021-06-13
|
* Add `Copy` derive to `PromptEvent`Wojciech Kępka2021-06-13
|
* commands: Add more write commandsWojciech Kępka2021-06-13
|
* Add clarification to last bufferIvan Tham2021-06-13
|
* add symbol picker (#230)Robin2021-06-12
| | | | | | | | | * add symbol picker use the lsp document_symbol request * fix errors from merging in master * add docs for symbol picker
* add alternate file (#223)Robin2021-06-12
| | | | | | | | | | | | | * 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
* lsp: Check bounds when converting lsp positions (#204)Wojciech Kępka2021-06-12
| | | | | | | | | * lsp: Make position conversion funcs return `Option` * Add tests * Fixes * Revert pos_to_lsp_pos to panic
* Only auto-format for certain languagesBlaž Hrastnik2021-06-12
| | | | | Fixes #53 Fixes #207
* Add :earlier and :later commands that can be used to navigate the full edit ↵Jakub Bartodziej2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | history. (#194) * Disable deleting from an empty buffer which can cause a crash. * Improve on the fix for deleting from the end of the buffer. * Clean up leftover log. * Avoid theoretical underflow. * Implement :before which accepts a time interval and moves the editor to the closest history state to the commit of the current time minus that interval. Current time is now by default, or the commit time if :before has just been used. * Add :earlier an :later commands that can move through the edit history and retrieve changes hidded by undoing and commiting new changes. The commands accept a number of steps or a time period relative to the currrent change. * Fix clippy lint error. * Remove the dependency on parse_duration, add a custom parser instead. * Fix clippy errors. * Make helix_core::history a public module. * Use the helper for getting the current document and view. * Handled some PR comments. * Fix the logic in :later n. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Add an alias for :earlier. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Add an alias for later. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Run cargo fmt. * Add some tests for earlier and later. * Add more tests and restore the fix for later that diappeared somehow. * Use ? instead of a match on an option. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Rename to UndoKind. * Remove the leftover match. * Handle a bunch of review comments. * More systemd.time compliant time units and additional description for the new commands. * A more concise rewrite of the time span parser using ideas from PR discussion. * Replace a match with map_err(). Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Jakub Bartodziej <jqb@google.com> Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Movement fixes, refactor and unit test suite (#217)PabloMansanet2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add convenience/clarity wrapper for Range initialization * Test horizontal moves * Add column jumping tests * Add failing movement conditions for multi-word moves * Refactor skip_over_next * Add complex forward movement unit tests * Add strict whitespace checks and edge case tests * Restore formatting * Remove unused function * Add empty test case for deletion and fix nth_prev_word_boundary * Add tests for backward motion * Refactor word movement * Address review comments and finish refactoring backwards move * Finish unit test suite * Fmt pass * Fix lint erors * Clean up diff restoring bad 'cargo fmt' actions * Simplify movement closures (thanks Pickfire) * Fmt pass * Replace index-based movement with iterator based movement, ensuring that each move incurs a single call to the RopeSlice API * Break down tuple function * Extract common logic to all movement functions * Split iterator helpers away into their own module * WIP reducing clones * Operate on spans * WIP simplifying iterators * Simplify motion helpers * Fix iterator * Fix all unit tests * Refactor and simplify * Simplify fold
* commands: Handle `t<ENTER>` as till newlineWojciech Kępka2021-06-11
|
* move to first nonwhitespace on shift-iRobin van Dijk2021-06-10
| | | | This matches the behaviour in vim and kak
* Fix jump behavior, goto_implementation now jumpIvan Tham2021-06-10
| | | | | Better jump behavior since we override the first jump if it's on the first document. At the same time, ctrl-i is now working with gd jumps.
* Support go to line 1Zheming Li2021-06-08
|
* Make `r<ENTER>` workWojciech Kępka2021-06-08
|
* Remove unwanted `as_str`Wojciech Kępka2021-06-08
|
* Don't replace newlinesWojciech Kępka2021-06-08
|
* Add bounds checks to replaceWojciech Kępka2021-06-08
|
* commands: Replace all characters in selectionWojciech Kępka2021-06-08
|
* Cleanup find_first_non_whitespace_char funcsWojciech Kępka2021-06-08
|
* commands: Add goto first non-whitespace char of lineWojciech Kępka2021-06-08
|
* Fix Unicode (#135)Kirawi2021-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * wip * wip * fix unicode break * fix unicode break * Update helix-core/src/transaction.rs Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu> * clippy * fix * add changes * added test * wip * wip * wip * wip * fix * fix view * fix #88 Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* commands: Add replace with yanked as `R`Wojciech Kępka2021-06-08
|
* ui: completion: Use the correct type_nameBlaž Hrastnik2021-06-07
| | | | Fixes #166
* Make gh/gl extend selection in select modeBlaž Hrastnik2021-06-07
|
* Implement register selectionBenoît CORTIER2021-06-07
| | | | | | User can select register to yank into with the " command. A new state is added to `Editor` and `commands::Context` structs. This state is managed by leveraging a new struct `RegisterSelection`.
* lsp: Provide workspace root on client.initialize()Blaž Hrastnik2021-06-07
|
* View mode: Use saturating_sub when calculating first_colBlaž Hrastnik2021-06-07
|