Range sort
and rsort
do nothing
#6841
-
Summary
Reproduction Stepshttps://asciinema.org/a/FrVjmyIXpxmfyYtyxbKKTmeev I tried this:
I expected this to happen: The lines should be sorted in order Instead, this happened: Nothing happens Helix log~/.cache/helix/helix.log2023-04-21T10:47:52.697 helix_vcs [ERROR] failed to obtain current head name for //test.txt 2023-04-21T10:48:19.532 helix_view::editor [ERROR] editor error: 1 unsaved buffer(s) remaining: ["test.txt"]PlatformMacOS Terminal EmulatorAlacritty 0.11.0 Helix Versionhelix 23.03 (3cf0372) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
helixes |
Beta Was this translation helpful? Give feedback.
helixes
:sort
command is more general then vims and doesn't operate on lines and instead sorts the selections. For helix multi cursors/selections are a core part of the editing model. You can create on cursors manually withc
or use a regex withs
to create a selection at each regex match within the current selection. You can split an existing selection at line boundaries with A-s. Then using:sort
afterward matchesvims
sort command but you can also sort words for example:s\w+<ret>:sort<ret>
selects and then sorts all words in the selections.