Highlight selected word in text

550 views
Skip to first unread message

Alexey V Beloblotskiy

unread,
Mar 2, 2011, 4:13:12 PM3/2/11
to scite-i...@googlegroups.com
I've attached two files to this letter. So, you can see that Programmer's Notepad and Notepad++ both highlight selected word in text. This is very convenient and useful feature. Maybe somebody knows how to configure SciTE to do the same things. Thank you!
npp.jpg
pn.png

Philippe Lhoste

unread,
Mar 3, 2011, 3:51:00 AM3/3/11
to scite-i...@googlegroups.com

Configure, no, it isn't built in SciTE.
But the topic have been raised in the past (at least once, perhaps more) and I saw a Lua
script or two to do this kind of thing. At least with a keyboard shortcut (unsure if it
can be done systematically, or even if it is a good idea.

Note: in Eclipse, only the identifier in the current scope is highlighted. As you show, in
Scintilla it would highlight all occurrences, which can be a good thing or not. I think it
can be refined so that it highlight only words of same lexer state (ie. avoid comments,
strings, etc.).

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

mozers

unread,
Mar 3, 2011, 9:02:23 AM3/3/11
to Alexey V Beloblotskiy
Thursday, March 3, 2011, 12:13:12 AM, Alexey wrote:

I've attached two files to this letter. So, you can see that Programmer's Notepad and Notepad++ both highlight selected word in text. This is very convenient and useful feature. Maybe somebody knows how to configure SciTE to do the same things. Thank you!


In SciTE-Ru is implemented with script highlighting_identical_text.lua

-- 
mozers
<http://scite-ru.org>

Alexey

unread,
Mar 12, 2011, 3:03:35 PM3/12/11
to scite-interest
highlighting_identical_text.lua is good, I've added it in my SciTE
intallation.
Thank you!

olof.an...@verifone.com

unread,
Aug 23, 2018, 5:07:39 AM8/23/18
to scite-interest
This is now available in standard SciTE:

highlight.current.word
highlight.current.word.indicator
highlight.current.word.colour
highlight.current.word.by.style

Reply all
Reply to author
Forward
0 new messages