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

Feature request: highlight text like region only #7

Closed
Kaligule opened this issue Sep 23, 2015 · 4 comments
Closed

Feature request: highlight text like region only #7

Kaligule opened this issue Sep 23, 2015 · 4 comments

Comments

@Kaligule
Copy link
Contributor

It would be nice to have things highlighted only if they are selected in the region.

This would mean your eye isn't distracted when doing simple typing, but only when selecting stuff like variables and lines that repeat frewuently. It could also lead to nice synergy effects with other packages like expand-region etc for free.

@fgeller
Copy link
Owner

fgeller commented Sep 23, 2015

Thanks for your feedback! Do you mean that things should only be highlighted in an active region?

e.g., if point is | and @ is mark:

You set mark in a situation like the sample below:

abc|
def
abc
def
abc

you then move point to

abc@
def
abc
def
abc|

and only the second and third abc would get highlighted?

abc@
def
[abc]
def
[abc]|

Or were you thinking of another case?

@Kaligule
Copy link
Contributor Author

No, I actually ment a different thing. In your example (@ is mark, | is point, [] is highlight)

abc
def
abc|
def
abc

(mark not set, so nothing is highlighted)

[abc]
def
@abc|
def
[abc]

(mark is set, so everything like the thing between mark and point is highlighted)
Another example:

[abc xyz]
def
@abc xyz|
def
abc def 

No that I reread my issue, you really could not understand what I meant myself, sorry for this.

@fgeller fgeller closed this as completed in eaf817d Oct 1, 2015
@fgeller
Copy link
Owner

fgeller commented Oct 1, 2015

Cool idea, let me know if this works for you: (setq highlight-thing-what-thing region)

@Kaligule
Copy link
Contributor Author

Kaligule commented Oct 6, 2015

Works like a charm. Great work. Thank you.

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

2 participants