aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
Commit message (Collapse)AuthorAge
...
| * Simplify compositor.findBlaž Hrastnik2021-11-18
| |
| * fix: editor.close now takes only a single parameterBlaž Hrastnik2021-11-15
| |
| * Add command to inc/dec number under cursor (#1027)Jason Hansen2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add command to inc/dec number under cursor With the cursor over a number in normal mode, Ctrl + A will increment the number and Ctrl + X will decrement the number. It works with binary, octal, decimal, and hexidecimal numbers. Here are some examples. 0b01110100 0o1734 -24234 0x1F245 If the number isn't over a number it will try to find a number after the cursor on the same line. * Move several functions to helix-core * Change to work based on word under selection * It no longer finds the next number if the cursor isn't already over a number. * It only matches numbers that are part of words with other characters like "foo123bar". * It now works with multiple selections. * Add some unit tests * Fix for clippy * Simplify some things * Keep previous selection after incrementing * Use short word instead of long word This change requires us to manually handle minus sign. * Don't pad decimal numbers if no leading zeros * Handle numbers with `_` separators * Refactor and add tests * Move most of the code into core * Add tests for the incremented output * Use correct range * Formatting * Rename increment functions * Make docs more specific * This is easier to read * This is clearer * Type can be inferred
| * Readline style insert mode (#1039)Bob2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * readline style insert mode * update keymap.md * don't save change history in insert mode * Revert "don't save change history in insert mode" This reverts commit cb47f946d7fb62ceda68e7d1692a3914d0be7762. * don't affect register and history in insert mode * add insert_register * don't call exit_select_mode in insert mode * avoid set_selection * avoid duplicated current!
| * helix-term/commands: implement buffer-close (bc, bclose) (#1035)Cole Helbling2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * helix-view/view: impl method to remove document from jumps * helix-view/editor: impl close_document * helix-view/editor: remove close_buffer argument from `close` According to archseer, this was never implemented or used properly. Now that we have a proper "buffer close" function, we can get rid of this. * helix-term/commands: implement buffer-close (bc, bclose) This behaves the same as Kakoune's `delete-buffer` / `db` command: * With 3 files opened by the user with `:o ab`, `:o cd`, and `:o ef`: * `buffer-close` once closes `ef` and switches to `cd` * `buffer-close` again closes `cd` and switches to `ab` * `buffer-close` again closes `ab` and switches to a scratch buffer * With 3 files opened from the command line with `hx -- ab cd ef`: * `buffer-close` once closes `ab` and switches to `cd` * `buffer-close` again closes `cd` and switches to `ef` * `buffer-close` again closes `ef` and switches to a scratch buffer * With 1 file opened (`ab`): * `buffer-close` once closes `ab` and switches to a scratch buffer * `buffer-close` again closes the scratch buffer and switches to a new scratch buffer * helix-term/commands: implement buffer-close! (bclose!, bc!) Namely, if you have a document open in multiple splits, all the splits will be closed at the same time, leaving only splits without that document focused (or a scratch buffer if they were all focused on that buffer). * helix-view/tree: reset focus if Tree is empty
| * helix-term/commands: implement cquit (#1096)Cole Helbling2021-11-15
| | | | | | This allows you to exit helix with an exit code, e.g. `:cq 2`.
| * minor: Remove leftover log lineBlaž Hrastnik2021-11-15
| |
| * Implement MarkedString renderingBlaž Hrastnik2021-11-15
| | | | | | | | Solves typescript and python documentation rendering
| * Add movement shortcut for history (#1088)Ivan Tham2021-11-14
| | | | | | alt-u and alt-U
| * Add trim_selections command (#1092)ath32021-11-14
| |
| * Added workspace_symbol_picker (#1041)Ebbe Steenhoudt2021-11-14
| | | | | | | | | | | | | | * Added workspace_symbol_picker * Moved truncation of the symbol pickers to the end. * Fixed typo
| * Implement "Goto last modification" command (#1067)ath32021-11-14
| |
| * helix-term/commands: move SCRATCH_BUFFER_NAME to helix-view/document (#1091)Cole Helbling2021-11-13
| | | | | | | | This way, the name is accessible everywhere `Document` and related types are.
| * Make prompts consistent (#1080)Omnikar2021-11-12
| |
| * Add `remove_selections` command (#1065)Omnikar2021-11-12
| | | | | | | | | | | | | | | | | | * Add `remove_selections` command * Document `remove_selections` * Update helix-term/src/keymap.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
| * Fix earlier/later missing changeset update (#1069)Ivan Tham2021-11-11
| | | | | | Fix #1059
| * helix-term/command: make scratch buffer name consistent (#1071)Cole Helbling2021-11-11
| |
| * Add `m` textobject for pair under cursor (#961)Omnikar2021-11-11
| |
| * add wonly -- window only (#1057)Bob2021-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | * add wonly * Update book/src/keymap.md Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * add `wonly` to space w mode too * remove the TODO Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
| * buffer picker add is_modifier flag (#1020)CossonLeo2021-11-10
| |
| * search_impl will only align cursor center when it isn't in view (#959)CossonLeo2021-11-09
| |
| * Add LSP rename_symbol (space-r) (#1011)CossonLeo2021-11-08
| | | | | | improve apply_workspace_edit
| * Add WORD textobject (#991)Omnikar2021-11-08
| | | | | | | | | | * Add WORD textobject * Document WORD textobject
* | dap: Simplify get_breakpoint_at_current_lineBlaž Hrastnik2021-11-07
| |
* | Make picker take the whole context, not just editorBlaž Hrastnik2021-11-07
| |
* | Merge branch 'master' into debugBlaž Hrastnik2021-11-06
|\|
| * Specify vector capacity on surround_addBlaž Hrastnik2021-11-06
| |
| * Simplify current!(..).1 into doc!()Blaž Hrastnik2021-11-06
| |
| * Simplify goto_*_diagnostic commandsBlaž Hrastnik2021-11-06
| |
| * minor: view!(..).doc is slightly more efficient than current!(..).1.id()Blaž Hrastnik2021-11-06
| |
| * Retain range direction on searchBlaž Hrastnik2021-11-06
| | | | | | | | Co-authored-by: CossonLeo <20379044+cossonleo@users.noreply.github.com>
| * Implement Selection::replace to replace a single rangeBlaž Hrastnik2021-11-06
| | | | | | | | | | | | Fixes #985 Co-authored-by: Daniel S Poulin <crimsonmage+github@gmail.com>
| * Add reverse search functionality (#958)Gygaxis Vainhardt2021-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add reverse search functionality * Change keybindings for extend to be in select mode, incorporate Movement and Direction enums * Fix accidental revert of #948 in rebase * Add reverse search to docs, clean up mismatched whitespace * Reverse search optimization * More optimization via github feedback
| * Inform when reaching undo/redo bounds (#981)Omnikar2021-11-05
| | | | | | | | | | | | | | | | * Inform when reaching undo/redo bounds * `Already at oldest change` when undo fails * `Already at newest change` when redo fails * Add missing `the`
| * Rewrite goto_bufferBlaž Hrastnik2021-11-04
| |
| * Implement "Goto next buffer / Goto previous buffer" commandsath32021-11-04
| |
| * Replace documents SlotMap with BTreeMapBlaž Hrastnik2021-11-04
| |
| * Add c-s to pick word under doc cursor to prompt line & search completion (#831)CossonLeo2021-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add prompt shourtcut to book Add completions to search Add c-s to pick word under doc cursor to prompt line * limit 20 last items of search completion, update book * Update book/src/keymap.md Co-authored-by: Ivan Tham <pickfire@riseup.net> * limit search completions 200 Co-authored-by: Ivan Tham <pickfire@riseup.net>
| * only remove primary index when search next without extend (#948)CossonLeo2021-11-02
| |
| * Make match work with extend and multi cursors (#920)Ivan Tham2021-10-29
| |
| * Support extend for multiple goto (#909)Ivan Tham2021-10-29
| | | | | | gg, ge, [n]gg
| * add expand_selection to last_motioncossonleo2021-10-29
| |
| * Implement `hx --tutor` and `:tutor` to load `tutor.txt` (#898)Omnikar2021-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement `hx --tutor` and `:tutor` to load `tutor.txt` * Document `hx --tutor` and `:tutor` * Change `Document::set_path` to take an `Option` * `Document::set_path` accepts an `Option<&Path>` instead of `&Path`. * Remove `Editor::open_tutor` and make tutor-open functionality use `Editor::open` and `Document::set_path`. * Use `PathBuf::join` Co-authored-by: Ivan Tham <pickfire@riseup.net> * Add comments explaining unsetting tutor path Co-authored-by: Ivan Tham <pickfire@riseup.net>
| * Fix `:quit!` description and tense of other commands (#902)Omnikar2021-10-25
| |
| * find motion and textobj motion repeat (#891)CossonLeo2021-10-24
| |
| * Filter completion items from language server by starts_with word under ↵CossonLeo2021-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | cursor (#883) * filter items by starts_with pre nth char of cursor * add config for filter completion items by starts_with * filter items by starts_with pre nth char of cursor * add config for filter completion items by starts_with * remove completion items pre filter configuratio
| * Add commands for moving between splits with a direction (#860)Oskar Nehlin2021-10-23
| | | | | | | | | | | | | | | | | | * Add commands for moving between splits with a direction * Update keymaps * Change picker mapping * Add test and clean up some comments
| * Add treesitter textobjects (#728)Gokul Soumya2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add treesitter textobject queries Only for Go, Python and Rust for now. * Add tree-sitter textobjects Only has functions and class objects as of now. * Fix tests * Add docs for tree-sitter textobjects * Add guide for creating new textobject queries * Add parameter textobject Only parameter.inside is implemented now, parameter.around will probably require custom predicates akin to nvim' `make-range` since we want to select a trailing comma too (a comma will be an anonymous node and matching against them doesn't work similar to named nodes) * Simplify TextObject cell init
| * Replace current selection with all yanked values. (#882)radical3dd2021-10-21
| |
| * Improve completion trigger (#838)CossonLeo2021-10-18
| | | | | | | | | | | | | | * improve idle completion trigger * add completion-trigger-len to book * rename semantics_completion to language_server_completion and optimize idle completion trigger