Commit Graph

12 Commits (21d4bf859bd26ff536b9581ffc76169329c1bedf)

Author SHA1 Message Date
cossonleo 21d4bf859b tree helper and file explorer 2 years ago
Daniel S Poulin 0c05447d49
Add shrink equivalent of extend_to_line_bounds (#2450)
* Add shrink equivalent of extend_to_line_bounds

* Add a check for being past rope end in end position calc

* Include the EOL character in calculations

* Bind to `A-x` for now

* Document new keybind
2 years ago
Roland Kovacs 3f10473d30 Implement view swapping
* add Tree::swap_split_in_direction()
* add swap_view_{left,down,up,right} commands, bound to H,J,K,L
  respectively in the Window menu(s)
* add test for view swapping
2 years ago
Roland Kovacs 8958bf0a92
Implement view transpose (#2461)
Change the layout of existing split view from horizontal to vertical and
vica-versa. It only effects the focused view and its siblings, i.e. not
recursive.

Command is mapped to 't' or 'C-t' under the Window menus.
2 years ago
AntonioLucibello ac2ea800ce
Add undo checkpoint command (#2115)
* added undo checkpoint command

* changed add_undo_checkpoint to commit_undo_checkpoint

* mapped commit_undo_checkpoint to Alt-u

* Update default.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Ivan Tham c22873c33f
Change A-left right to C-left right in insert (#2193)
Currently A-left move one word left and the behavior will be more
consistent for people coming GUI world if the key was changed to control
given that both browsers and editors like vscode uses C-left right by
default to move word rather than alt.
2 years ago
Ivan Tham ab6a00e196
Make A-hjkl tree-sitter nav A-pion (#2205)
A-hl currently is not very consistent with hl when next object is
selected, since it may go up/down or left/right and this behavior is
confusing such that some people think it should swap the keys with A-jk,
so it is better to use A-pn since that only specifies two direction.

A-jk have the same issue as in it usually moves right and is not
consistent with the behavior of jk so people may think A-hl is better,
maybe A-oi is better here since A-hl will be swapped to A-pn, A-oi can
convey the meaning of in and out, similar to some window manager keys?
2 years ago
Michael Davis 3f2bd7770e
Rename paragraph motion commands from move to goto (#2226)
* fix command name for next/prev paragraph motion

* rename move_next/prev_paragraph to goto_next/prev_paragraph
2 years ago
gavynriebau 562874a720
Add command for picking files from CWD (#1600)
The `file_picker_at_current_directory` command opens the file picker at
the current working directory (CWD). This can be useful when paired with
the built-in `:cd` command which changes the CWD.

It has been mapped to `space F` by default.
2 years ago
Ivan Tham 8b91ecde40 Rename _para to _paragraph 2 years ago
Ivan Tham 8b02bf2ea8 Add (prev) paragraph motion
Also improved testing facility.

Fix #1580
2 years ago
Joe bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago