-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marks #3720
Marks #3720
Conversation
417c43a
to
98c4510
Compare
IMHO, Range should be renamed to Selection in code for confirmation with how is referred to colloquially. Correspondingly, Selection should be renamed simply to Selections, plural. But that's probably a separate PR. Regardless I think the user facing language should follow what people are saying. |
There's some really interesting discussion about how kakoune's marks could be improved or generalized in this post on the kakoune discourse that I think should be thought through before we commit to exactly the current kakoune implementation here. I'd like our version to be an improvement rather than just a copy. |
The top-level folding ideas look like marks ideas applied to the ranges of the current selection (rather than the current selection and the selection in the register). Since only I'm not sure I like the reduce idea with |
I'm still chewing on adding operations on the current selections. I agree intersection makes little sense there, and at least left and right most are achievable with a combination of I agree that the pipe thing as presented is too complicated and niche. There's something to being able to iterate and accumulate over contents of current selections, but that's best as a separate issue. In the meantime I found the original issue where |
One operation missing that has a lot of discussion in kakoune is adding the difference operation. |
98c4510
to
4a8cbcf
Compare
can this one be considered closed? |
So, is the |
I haven't looked at this or worked on it in a while. It's still a useful feature I'd like to see implemented eventually but I don't plan to work on it any time soon. So I'll close this out. Anyone interested can pick up this PR but it needs some work: we need to map the saved ranges through changes to their documents. |
Marks are a way of recording selections/ranges in a way that can be used later. It's like the ability to store jumplist entry in a registers plus commands to combine selections to/from registers. This PR implements kakoune's marks commands and also adds a function that joins the ranges of a given selection together.
I would like to explore basing LSP snippets on marks so I'll keep this as a draft for now.
Questions:
helix_core::selection::Selection
with manyhelix_core::selection::Range
s. Colloquially we call this multiple selections though. Should the marks commands say "selections" or "ranges"?z
/Z
is taken and the normal mode keymap is pretty much full. I'm using^
for now which is a bit hidden but it's nice that it matches the default marks register.Closes #703