How to extend ace-jump-mode?
PythonNut opened this issue · comments
Hello,
I am a happy user of evil-mode and I recently tried out EasyMotion for vim. I really liked it, so I've decided to try and implement it's behaviour as an evil-mode plugin. Unfortunately, I'm not sure how to make ace-jump-mode jump to an arbitrary location. Ideally, I'd generate a bunch of points and feed them to ace-jump. It looks like ace-jump is completely regex based. Is there any way to do what I'm thinking [specify locations generated by a function and jump between them]?
Thanks,
PythonNut
Although I am try to make ace jump internal functions cohesively, it seems there is no such function which meet your requirement.
But you can refer to the function "ace-jump-do", it is the main entry for all the ace jump function.
It completes the following main function:
- search the position via
ace-jump-search-candidate
- create the search tree via
ace-jump-tree-breadth-first-construct
- create each position a UI layer ( we call it overlay in emacs ) via
ace-jump-populate-overlay-to-search-tree
- give each position a key, which is used for user to select via
ace-jump-update-overlay-in-search-tree
.
You can use the above functions to implement your own one, because ace jump mode use many internal structure to get more information about each candidate positions, so right now, there is no a simple function which accepts position list directly.