Sublime Forum

Highlight Current Word

#21

O, yea, it went through a few iterations. The original version did a search on the whole file for the word, so it delayed it a good bit.

However, I changed it to only do the search on the current viewable area of the file. At most that’s searching 1000 character or so, nothing too much.
So, I do the search on more or less every modification (on_sel_modified), and I need to do it when you scroll. There is no on_scroll event, so every 50 ms it checks if the scroll position has changed, and if so does the search.

Sorry for the bad comment.

0 Likes

#22

How to change the background to selected word ?

0 Likes

#23

Could it be made to highlight after double-clicking the word? I think it’d be less distracting

0 Likes