aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
Commit message (Collapse)AuthorAge
* keymap: Store pending/sticky on the root levelBlaž Hrastnik2022-03-20
|
* Add horizontal and vertical split scratch buffers (#1763)Joe2022-03-14
| | | | | | | Make subcommand name more descriptive Fix vsplit completer Run cargo xtask docgen
* Perform extend line on every selection (#1804)Ivan Tham2022-03-14
| | | | Currently `x` only affect the current selection, but this will make it affect every selection so `x` can be more useful with multi-cursors.
* Match in visual use head not anchor (#1805)Ivan Tham2022-03-14
| | | | | | Currently match is finding the match based on the anchor rather than the head (cursor) so this behavior is rather unexpected when user is doing a match but a different item was matched instead when the selection is more than one character.
* minor: occurance -> occurrenceBlaž Hrastnik2022-03-14
|
* Fix: insert_register (#1751)Narazaki Shuji2022-03-13
| | | | | - set register name correctly - use autoinfo to display register contents - call `paste` with `Paste::Cursor`
* Use `^` and `$` to match the beginning and end of a line when searching (#1790)nibon72022-03-12
| | | | | Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>
* Change parameter object keybind from `p` to `a` (#1708)Gokul Soumya2022-03-07
| | | | This is largely to avoid a collision with the soon to be merged paragraph object which takes up the p key.
* Split out typable commands into a separate fileBlaž Hrastnik2022-03-07
|
* Add comment textobject for surround selection and navigation (#1605)Daniel S Poulin2022-03-06
|
* Reuse visual_coords_at_pos function in viewBlaž Hrastnik2022-03-04
|
* minor: Remove some outdated commentsBlaž Hrastnik2022-03-03
|
* Extract a common function for paste_before/_afterBlaž Hrastnik2022-03-03
|
* Refactor align_selection by simplifying the calculationBlaž Hrastnik2022-03-03
|
* refactor align_selection using kakoune logicBob Qi2022-03-03
|
* Fix bug with auto replacing components in compositor (#1711)Gokul Soumya2022-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix bug with auto replacing components in compositor This was last known to be working with 5995568c at the time of commit, but now doesn't work with latest rust stable. The issue probably stems from using std::any::type_name() for finding a component in the compositor, for which the docs explicitly warn against considering it as a unique identifier for types. `replace_or_push()` takes a boxed `Component` and passes it to `find_id()` which compares this with a bare Component. `type_name()` returns `Box<T>` for the former and `T` for latter and we have a false negative. This has been solved by using a generics instead of trait objects to pass in a `T: Component` and then use it for comparison. I'm not exactly sure how this worked fine at the time of commit of 5995568c; maybe the internal implementation of `type_name()` changed to properly indicate indirection with Box. * Do not compare by type name in compositor find_id
* Implement bulk buffer closing commands (#1677)Daniel S Poulin2022-03-01
| | | | | | | | | | | | | | | | | | | | * Implement buffer-close-all * Implement buffer-close-others * Refactor all buffer close variants to use shared logic * Fix clippy lint * Docgen for new commands * Shorten error message for attempting to close buffers that don't exist * Refactor shared buffer methods to pass only editor, not whole compositor * Switch signature of bulk buffer closing to use slice of DocumentIds Addresses feedback that accepting an IntoIterator implementor is too much for an internal. Also possibly saves some moving?
* Show infobox to hint textobjects with `mi` and `ma` (#1686)Daniel S Poulin2022-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show infobox to hint textobjects with `mi` and `ma` * Add note to infobox than any pair of characters will work too The wording could probably be a little more clear, but I wanted to keep it short but still accurate. * Don't allocate a vec for the static help text * Fix bug where `mi<esc>` would swallow next input and persist infobox * Better help text for arbitrary pair matching in textobject selection * Add way to add fake pending key data below status, use with `mi`/`ma` This is a bit hacky as it makes use of global state which will end up managed in multiple places, but has precedent in the way autoinfo works. There should probably be a bigger refactor to handle this kind of state better. * Return early on anything other than `mi` and `ma` for autoinfo * Remove "ascii" from help text with `mi` and `ma` * Update helix-term/src/ui/editor.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Show surround delete and replace errors in editor (#1709)Gokul Soumya2022-02-28
| | | | | * Refactor surround commands to use early returns * Show surround delete and replace errors in editor
* fix(commands): don't indent empty lines (#1653)Matouš Dzivjak2022-02-25
| | | | | | | | | | | | | * fix(commands): don't indent empty lines Fixes: https://github.com/helix-editor/helix/issues/1642 * Apply suggestions * Update helix-term/src/commands.rs * Update helix-term/src/commands.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Configurable auto pairs (#1624)Skyler Hawthorne2022-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * impl auto pairs config Implements configuration for which pairs of tokens get auto completed. In order to help with this, the logic for when *not* to auto complete has been generalized from a specific hardcoded list of characters to simply testing if the next/prev char is alphanumeric. It is possible to configure a global list of pairs as well as at the language level. The language config will take precedence over the global config. * rename AutoPair -> Pair * clean up insert_char command * remove Rc * remove some explicit cloning with another impl * fix lint * review comments * global auto-pairs = false takes precedence over language settings * make clippy happy * print out editor config on startup * move auto pairs accessor into Document * rearrange auto pair doc comment * use pattern in Froms
* Close some popups automatically (#1285)Bram2022-02-23
| | | | | | | | | | | | | | | | | | | * Add Event::Used to use event callback without consuming * Close popup if contents ignored event * collect event results before executing callbacks * don't add new result variant, use Ignored(..) instead * break in match cases * Make auto_close configurable * fix merge * auto close hover popups * fix formatting
* Simplify some codeBlaž Hrastnik2022-02-21
|
* ui: prompt: Render aliases + border on the docBlaž Hrastnik2022-02-20
|
* Move most LSP specific commmands to commands::lspBlaž Hrastnik2022-02-18
|
* Refactor symbol picker to share codeBlaž Hrastnik2022-02-18
|
* feat(commands): command palette (#1400)Matouš Dzivjak2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(commands): command palette Add new command to display command pallete that can be used to discover and execute available commands. Fixes: https://github.com/helix-editor/helix/issues/559 * Make picker take the whole context, not just editor * Bind command pallete * Typable commands also in the palette * Show key bindings for commands * Fix tests, small refactor * Refactor keymap mapping, fix typo * Ignore sequence key bindings for now * Apply suggestions * Fix lint issues in tests * Fix after rebase Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Manually recalculate initial completion where it mattersBlaž Hrastnik2022-02-17
|
* Pass through Editor instead of ContextBlaž Hrastnik2022-02-17
|
* WIP: show all buffers that couldn't be closedCole Helbling2022-02-17
|
* helix-term: implement buffer completerCole Helbling2022-02-17
| | | | | | In order to implement this completer, the completion function needs to be able to access the compositor's context (to allow it to get the list of buffers currently open in the context's editor).
* helix-term/commands: display buffer id in pickerCole Helbling2022-02-17
|
* Allow static strings in set_status/set_error so API is nicerBlaž Hrastnik2022-02-15
|
* Add tree-sitter based function, class navigationGokul Soumya2022-02-15
|
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard ↵Ludwig Stecher2022-02-15
| | | | | | | | | | | | | | | shortcuts to file picker (#1612) * Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker * Refactor file picker paging logic * change key mapping * Add overlay component * Use closure instead of margin to calculate size * Don't wrap file picker in `Overlay` automatically
* use PathBuf::to_string_lossy() instead of to_str() (#1655)Kirawi2022-02-15
|
* Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2022-02-13
|\
| * postpone clone after found (#1656)Cydiater2022-02-13
| |
| * Replace tendril with smartstringBlaž Hrastnik2022-02-10
| | | | | | | | Slightly smaller API surface, less dependencies.
| * feat(editor): add config for search wrap_around (#1516)Matouš Dzivjak2022-02-10
| | | | | | | | | | | | | | | | | | * feat(editor): add config for search wrap_around Fixes: https://github.com/helix-editor/helix/issues/1489 * Move search settings into separate config * Disable linter
| * Show infobox with register contentsGokul Soumya2022-02-10
| |
| * Prevent multiple code action popupsGokul Soumya2022-02-08
| |
| * Preselect first item in code action popup menuGokul Soumya2022-02-08
| |
| * Replace if let with early returnGokul Soumya2022-02-08
| |
| * Render code actions as a menu, allow adding padding to popupBlaž Hrastnik2022-01-31
| |
| * Improve code action picker by displaying it inlineBlaž Hrastnik2022-01-31
| |
| * Automatically commit changes to history if not in insert modeBlaž Hrastnik2022-01-30
| | | | | | | | Fixes #1500
| * Use markup scopes for the Markdown component (#1363)CossonLeo2022-01-24
| |
| * Allow specifying file start position (#445)Ivan Tham2022-01-23
| | | | | | Like helix-term/src/commands.rs:3426:15
| * change show_subtree command into ':tree-sitter-subtree' typable command (#1524)Michael Davis2022-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | * add default keymap for show_subtree command * remove space+t keymap * add a typable command ':show-subtree' * generate documentation for ':show-subtree' * remove non-typable show_subtree command * ':show-subtree'->':tree-sitter-subtree'