Highligh all similar word in Document to selection
72 views
Skip to first unread message
HHT
unread,
Jun 14, 2012, 8:27:55 AM6/14/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla-interest
Hi,
I need to highlight/un-highlight all words in the document similar to
current selection. Does scintilla support that?
If it supports I will appreciate pointer to right direction. Docs as
well as google have been of no help to me this time but then I may be
missing something right there :)
TIA,
Stefano
Nicholai Benalal
unread,
Jun 14, 2012, 9:22:54 AM6/14/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla...@googlegroups.com, scintilla-interest
Hi,
I don't think there's any direct support for this in scintilla so you would have to implement it yourself in the editor. That's what we do in the Scribble editor for MorphOS at least.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla...@googlegroups.com
I just went through this recently. There are two Lua examples that I found helpful; search for markOccurrences.lua and highlighting_identical_text.lua .
These are the basic steps:
Get the selected text.
Search for an occurance. It is up to you to decide screen-view or full doc. Delays may be noticeable with long docs, if you do the whole thing. Use RegEx if you need "similar" words, and not exact matches.
Mark the find with an Indicator, using SCI_INDICATORFILLRANGE. Rinse and Repeat.
To unmark them, use SCI_INDICATORCLEARRANGE
Have fun!
Philippe Lhoste
unread,
Jun 14, 2012, 10:47:45 AM6/14/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla...@googlegroups.com
SciTE can do that now. The property enabling that is highlight.current.word
You can locate how it is done by searching the source of SciTE around this property...
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --
HHT
unread,
Jun 14, 2012, 3:38:27 PM6/14/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla-interest
Thank you all for your help.
I will go thru your suggestions and work out a solution!