aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
Commit message (Collapse)AuthorAge
...
| * Load alt default theme if true color is not supportedOmnikar2021-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move `runtime/themes/base16_default_terminal.toml` to `base16_theme.toml` alongside `theme.toml` * Use `terminfo` crate to detect whether the terminal supports true color and, if the user has no theme configured and their terminal does not support true color, load the alt default theme instead of the normal default. Remove `terminfo` dependency, use `COLORTERM` env instead Prevent user from switching to an unsupported theme Add `true-color-override` option If the terminal is wrongly detected to not support true color, `true-color-override = true` will override the detection. Rename `true-color-override` to `true-color`
| * minor: Shorten goto file(s) descriptionsBlaž Hrastnik2021-12-13
| |
| * Macros (#1234)Omnikar2021-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Macros WIP `helix_term::compositor::Callback` changed to take a `&mut Context` as a parameter for use by `play_macro` * Default to `@` register for macros * Import `KeyEvent` * Special-case shift-tab -> backtab in `KeyEvent` conversion * Move key recording to the compositor * Add comment * Add persistent display of macro recording status When macro recording is active, the pending keys display will be shifted 3 characters left, and the register being recorded to will be displayed between brackets — e.g., `[@]` — right of the pending keys display. * Fix/add documentation
| * Open files with spaces in filename, allow opening multiple files (#1231)ath32021-12-12
| |
| * Add `save_selection` command (#1247)Omnikar2021-12-10
| |
| * Only use a single documentation popup (#1241)Kirawi2021-12-08
| |
| * docs: Auto generate command listGokul Soumya2021-12-08
| |
| * Make kill_to_line_end behave like emacs (#1235)WindSoilder2021-12-06
| |
| * Small changeJason Rodney Hansen2021-12-05
| |
| * Don't increment for overlapping changesJason Rodney Hansen2021-12-05
| |
| * CleanupJason Rodney Hansen2021-12-05
| |
| * Add support for time and more date formatsJason Rodney Hansen2021-12-05
| |
| * Add `Increment` traitJason Rodney Hansen2021-12-05
| |
| * Add support for dates for increment/decrementJason Rodney Hansen2021-12-05
| |
| * feat: Make it possible to keybind `TypableCommands` (#1169)Oskar Nehlin2021-12-04
| | | | | | | | | | | | | | * Make TypableCommands mappable * Fix pr comments * Update PartialEq implementation
| * cargo fmtBlaž Hrastnik2021-12-03
| |
| * Bump rust to 1.57, fix new lint failuresBlaž Hrastnik2021-12-03
| |
| * Add last modified file (gm) (#1093)Ivan Tham2021-12-02
| |
| * fix goto_window index crash (#1207)Bob2021-12-02
| |
| * Revert "Improve dedent behavior, make kill_to_line_end behave like emacs ↵Blaž Hrastnik2021-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | (#1173)" 1. pressing o on a line with no indentation will open a new line as expected, but esc will then delete the line altogether 2. the kill_line behavior happens after insert mode changes are already commited to history, and the change isn't commited. pressing u after this will break highlighting & undo history This reverts commit c08d2fae587a0a5dd2a1e2e44a1f385d142c9d59.
| * minor: Use anchor::ensure in some casesBlaž Hrastnik2021-12-01
| |
| * Improve dedent behavior, make kill_to_line_end behave like emacs (#1173)WindSoilder2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * restore indent when press esc right after open a new line * add comment for restore_indent * fix, and make kill to line end behaves like emacs * update comment * fix comment * adjust cancel restore_indent situation * check esc logic in mode transaction * improve comment * add more check for dedent * update comment * use matches to check for last_cmd * no need to introduct CommandFun type
* | Make dap_start non-blockingBlaž Hrastnik2021-12-03
| |
* | dap: Fix an off-by-one and move the function over to commands/dapBlaž Hrastnik2021-12-02
| |
* | These TODOs have been resolvedBlaž Hrastnik2021-12-01
| |
* | dap: Rewrite breakpoints so that there's a single set maintainedBlaž Hrastnik2021-11-30
| |
* | Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2021-11-30
|\|
| * Accept count for goto_window (#1033)Bob2021-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * accept count for goto_window also fix view is not fullfilled issue * fix fulfilled mispell * Update helix-term/src/commands.rs Co-authored-by: Ivan Tham <pickfire@riseup.net> * Update helix-term/src/commands.rs Co-authored-by: Ivan Tham <pickfire@riseup.net> * fix merge issue * revert line computation logic Co-authored-by: Ivan Tham <pickfire@riseup.net>
| * gf as goto_file (#1102)Bob2021-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | * goto_file * support goto_file under current cursor * add C-w f/F * sync space w with window mode * Update helix-term/src/commands.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
| * Detect filetype on :write (#1141)RustyStriker2021-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #1136 * removed a log::info * removed temp.rs * cargo clippy no longer complains * new get_lang_server function * get_lang_server is now launch_language_server * launch_lang_server will now close the previous one * better code readability * remove resfresh_ls(and a wrong comment)
| * Do not crash when run goto command without line number (#1160)Thanabodee Charoenpiriyakij2021-11-25
| | | | | | | | | | | | | | | | | | | | * Do not crash when run goto command without line number Report an error when running goto command without entering a line number. Fixes #1159 * Use is_empty() instead check len zero
| * Implement no-yank delete/change (#1099)ath32021-11-24
| |
| * Add `:<line>` and `:goto <line>` commands (#1128)Martin Junghanns2021-11-24
| | | | | | | | | | | | | | | | | | * Add typable `goto` command * Support `:<line-number>` on prompt * Rename function according to convention * Directly call into goto_line_number function
| * Align selections via & (#1101)Bob2021-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * align lines * remove log statement * use selections to align * fix a clippy issue * only accept 1,2,3 as user count * Update helix-term/src/commands.rs Co-authored-by: Ivan Tham <pickfire@riseup.net> * return if user count is not correct * add doc Co-authored-by: Ivan Tham <pickfire@riseup.net>
| * File picker config (#988)Dan Nases Sha2021-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * squashed WIP commits * hide_gitignore working with config * pass reference to new config parameter of file_picker() * update config option name to match name on walk builder * add comments to config and documentation of option to book * add git_ignore option to WalkBuilder within prompt in commands.rs * WIP: add FilePickerConfig struct * WIP: cleanup * WIP: add more options including max_depth * WIP: changed defaults to match ignore crate defaults * WIP: change WalkBuilder in global_search() to use config options * WIP: removed follow_links, changed max_depth to follow config setting * WIP: update book with file-picker inline table notation * update documentation for file-picker config in book * adjusted to [editor.file-picker] in book configuration.md * adjust comments in editor.rs to be doc comments, cleanup * adjust comments * adjust book
| * Jump to end char of surrounding pair from any cursor pos (#1121)Martin Junghanns2021-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Jump to end char of surrounding pair from any cursor pos * Separate bracket matching into exact and fuzzy search * Add constants for bracket chars * Abort early if char under cursor is not a bracket * Simplify bracket char validation * Refactor node search and unify find methods * Remove bracket constants
* | dap: Remove the prompt line parameter, use insert_str insteadBlaž Hrastnik2021-11-22
| |
* | Merge remote-tracking branch 'origin/master' into debugBlaž Hrastnik2021-11-21
|\|
| * fix: Expand tilde first, then deal with relative pathsBlaž Hrastnik2021-11-19
| | | | | | | | | | | | Otherwise the ~ gets treated as a relative path. Fixes #1107
| * Implement indent-aware delete (#1120)WindSoilder2021-11-18
| | | | | | | | | | * delete character backward can make undent behavior * improve to handle mixed indentation
| * Ensure cursor in view after pipe (#1123)Ivan Tham2021-11-18
| | | | | | Fix #1024
| * 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