-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add highlight-symbol-nav-mode #15
Conversation
This minor mode binds highlight-symbol-prev and highlight-symbol-next to M-p and M-n respectively. It is not particularly advanced, but quite convenient.
Would be nice to have a globalized variant of this too. |
I'm a big fan of wrapping groups of related interactive functions into minor mode + global minor mode pairs. Seems to give the best blend of flexibility and convenience. |
While I'm not a fan of such groupings, I don't mind adding it by popular demand. :) I'm not opposed to a global mode, either, but could there be any problems in special buffers? (See my concerns in #11.) |
@nschum I don't know, whether there could be problems. It is possible to inhibit a global mode in specific buffers, but I have no clue, what prerequisites a buffer must fulfill to be compatible with symbol navigation. I haven't looked at the source of these functions. Shouldn't you know which modes are incompatible? |
Well, as I said in #11: I only enable the keybindings in coding modes, so I haven't really tested anywhere else. I also generally don't use global modes. Before merging a global mode, I'd like to know it's been tested a bit so there aren't any surprises. |
I guess merging the commit automatically closes the PR. That's not an indication I've decided against a global mode. :) |
You're right that hooking As far as default restrictions for global modes go, I find this a fairly conservative "turn-on" function template:
|
But @lunaryorn or I can now easily try a globalized version of this minor mode locally and see if it makes sense. So thanks for merging. :-) |
@nschum Thank you :) |
This minor mode binds highlight-symbol-prev and highlight-symbol-next to M-p
and M-n respectively.
It is not particularly advanced, but quite convenient.