Skip to content
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

Any possibility to constrain search to start of word or camelCase? #42

Closed
dchenbecker opened this issue Apr 3, 2014 · 3 comments
Closed

Comments

@dchenbecker
Copy link

Love the plugin, but one thing that I would love is a mode or config setting to just search for characters right after non-alphanumeric characters (e.g. start of words). Sometimes the tag soup that results from, say, jumping to "e" is a bit tough to dig through.

@breandan
Copy link
Collaborator

breandan commented Aug 5, 2016

This would be a nice feature to have. There should be a better tag-search mechanism, maybe one that tries to retain some similarity with the underlying word. There are 26*26=676 two letter tags to assign, and we can try to match them to a unique substring inside each word, or fall back to a unique camelcase, or even any sequential characters with gaps (evenly distributing tags to words throughout the screen).

There should be a way to assign tags such that no two-letter tag matches any two letter string inside the screen. There are plenty of unused two letter strings that do not commonly occur (ex. "XX", "YY", "GF"). If we enumerate the set of all two letter strings for each screenful, and retain the complement of that set for tagging, then users can directly type a word on the screen, and we can dynamically narrow down the targets after each keystroke without any tag collisions.

Another optimization would be to highlight unique one- and two- character strings on the screen as soon as AceJump is triggered (without waiting for the search character). If the user types any of these unique one- or two-character strings, there is only one possible jump point. If the user starts typing a non-unique string, we can recycle tags using nearby letters on the keyboard, or do a camel-case search like autocompletion in IntelliJ IDEA.

Finally, we should try to prioritize tags by ease of typing instead of alphabetically. It's much easier to type "FF" than "YM". Vimium realizes this and uses adjacent (or nearby) character sequences to avoid finger travel distance. To implement this would need some kind of Comparator with a keyboard distance metric. Need to think about this one a little.

Let me know if you have any other ideas.

edit: Just remembered there is an nice feature request to use existing digraphs in the text: #27.

@favetelinguis
Copy link

Me to would like this, just as it works in Emacs. Then it also makes sense to extend the seach over multiple buffers so you can use Acejump to jump between splits!

@breandan
Copy link
Collaborator

All of the above features have been implemented, or deemed unworkable. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants