You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be great to have a way to jump to a mark. basically it would be evil-goto-mark with an overlay showing the actual mark characters. so when i create marks a and b using m a and m b and both are visible in the current window, SPC `` (backtick) would show an avyoverlay withaandbat the right positions. similarly,SPC '` (single quote) would show the overlay with the marks at the beginning of the lines.
In retrospect, I really should have renamed this package evil-avy.
As far as I can tell, this would require a lot of new code. If I were to implement it, it would dramatically increase the scope of this package. I'm not entirely opposed to this, but let me think about it for a bit.
I think it would be easier to traverse evil-markers-alist and collect the items where the cdr satisfies markerp. This should make a evil-next-mark function relatively short.
One thing to note is that this will include the point (which should be removed). It would be pretty simple to make a motion out of this that sorted them and jumped to the first. I'm not sure where the best place to add this new motion would be though.
Edit: To clarify, you would add another check to ensure that the position was greater than the point and then sort them or just choose the min.
I don't think avy has a way of specifically matching letters for every target. Maybe just override avy-keys with the mark characters in the order they appear?
thanks for looking into this. i think the "after point" check should be "is currently visible", i.e. both backward and forward as long as it's visible in the current window.
Sure, that would probably be the most useful. It was just an example. Another thing worth noting is that the implicit marks are included (such as [ and ]). Like with evil-visual-mark-mode, this would probably be most useful if there was an option to not include certain marks.
This is definitely interesting. I haven't had a chance to test it out, and I don't know when my next free moment will come, but I'd definitely be interested in adding something like this.
Activity
wbolster commentedon Jun 2, 2016
just for reference: https://github.com/roman/evil-visual-mark-mode is similar but not quite the same.
PythonNut commentedon Jun 2, 2016
Are there motions that traverse the marks?
wbolster commentedon Jun 2, 2016
not that i know of, there's
(evil-goto-mark "a")so perhaps some code around it can do that, but i do not have the elisp skills for it.wbolster commentedon Jun 2, 2016
also, the overlay characters should match exactly the mark names (which are also single characters), otherwise this feature is not useful at all.
PythonNut commentedon Jun 2, 2016
In retrospect, I really should have renamed this package
evil-avy.As far as I can tell, this would require a lot of new code. If I were to implement it, it would dramatically increase the scope of this package. I'm not entirely opposed to this, but let me think about it for a bit.
noctuid commentedon Oct 14, 2016
I think it would be easier to traverse
evil-markers-alistand collect the items where the cdr satisfiesmarkerp. This should make aevil-next-markfunction relatively short.noctuid commentedon Oct 14, 2016
Here's a quick example of getting all marker positions in the current buffer:
One thing to note is that this will include the point (which should be removed). It would be pretty simple to make a motion out of this that sorted them and jumped to the first. I'm not sure where the best place to add this new motion would be though.
Edit: To clarify, you would add another check to ensure that the position was greater than the point and then sort them or just choose the min.
PythonNut commentedon Oct 14, 2016
@noctuid I guess the hard part is ensuring the mark targets match the mark letters. I'd need to think about how to achieve that.
noctuid commentedon Oct 14, 2016
I don't think avy has a way of specifically matching letters for every target. Maybe just override
avy-keyswith the mark characters in the order they appear?noctuid commentedon Oct 14, 2016
Here's a quickly written example (could definitely be improved but seems to work):
wbolster commentedon Oct 14, 2016
thanks for looking into this. i think the "after point" check should be "is currently visible", i.e. both backward and forward as long as it's visible in the current window.
noctuid commentedon Oct 15, 2016
Sure, that would probably be the most useful. It was just an example. Another thing worth noting is that the implicit marks are included (such as
[and]). Like with evil-visual-mark-mode, this would probably be most useful if there was an option to not include certain marks.PythonNut commentedon Oct 23, 2016
This is definitely interesting. I haven't had a chance to test it out, and I don't know when my next free moment will come, but I'd definitely be interested in adding something like this.