Page 2 of 2

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun May 20, 2012 12:08 am
by Zebuddi123
@ Tenaja thanks for bringing the question to the forum :D

@ Danilo
Works great Just what the doctor ordered !!!
Thanks for sharing

Zebuddi. :D

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Jul 01, 2012 6:49 am
by c4s
Does this code http://www.purebasic.fr/english/viewtop ... 36#p381036 (from May 17, 2012 6:52 pm) work without modifying Scintilla.dll?

I'm asking because I compiled it in Unicode, installed it as an IDE tool with the %TEMPFILE argument and assigned a shortcut - and it doesn't work. Any ideas?

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Jul 01, 2012 4:25 pm
by Danilo
c4s wrote:Does this code http://www.purebasic.fr/english/viewtop ... 36#p381036 (from May 17, 2012 6:52 pm) work without modifying Scintilla.dll?

I'm asking because I compiled it in Unicode, installed it as an IDE tool with the %TEMPFILE argument and assigned a shortcut - and it doesn't work. Any ideas?
Works here with original PB Scintilla.dll

"%TEMPFILE" argument should have double quotes, and it works only with the word under the cursor, not with selections.

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Jul 01, 2012 5:39 pm
by c4s
Ah, of course the double-quotes... now it works.

There are a few problems though: The selection doesn't go away, sometimes the shortcut doesn't work or not all occurrences will be selected.
Fortunately I was able to fix this by also enabling "Wait until tool finishes" and the selection can be cleared by highlighting no word. ;)

Later I'll try your selection-based version too (where Scintilla.dll has to be updated) as it seems to be an even greater improvement for the IDE!

Thank you Danilo, well done!


Edit:
Wait, I just noticed that http://www.purebasic.fr/english/viewtop ... 91#p381091 (from May 18, 2012 3:52 pm) works without modifying Scintilla.dll (but still needs the "%TEMPFILE" argument)!
The clear advantage over the previous code I've linked to, is that I'm now able to use selections. It even works for multiple words! 8)

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Jul 01, 2012 6:53 pm
by Danilo
c4s wrote:Edit:
Wait, I just noticed that http://www.purebasic.fr/english/viewtop ... 91#p381091 (from May 18, 2012 3:52 pm) works without modifying Scintilla.dll (but still needs the "%TEMPFILE" argument)!
Not possible, as the code does not use %TEMPFILE (ProgramParameter(0)). :)

The code before (Fri May 18, 2012 12:24am) could work with old Scintilla.dll and "%TEMPFILE", but you can only use the first 7 styles.

I use the following style with the latest in-memory code:

Code: Select all

style = #INDIC_STRAIGHTBOX

color = RGB($00,$FF,$FF)

InnerAlpha  =  50
BorderAlpha = 200

#IGNORE_CASE = #True
AFAIK #INDIC_STRAIGHTBOX does not work with PureBasic's original Scintilla.dll

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Jul 01, 2012 8:33 pm
by c4s
@Danilo
How would Homer Simpson say? D'oh! :wink:

Of course you are absolutely right. I confused the codes because my browser didn't jump to the specific post I linked to, but rather some posts below or so - maybe it's a phpBB issue.
Anyway, as you say the code before is the correct on: http://www.purebasic.fr/english/viewtop ... 60#p381060

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sat Feb 16, 2013 9:41 pm
by skywalk
Thanks Danilo!
Really helpful stuff to build additional IDE tools. :D

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Mar 08, 2015 9:02 pm
by Blue
I'm late to the party, i know, but i just discovered this great hiliting tool by Danilo.
And i really wanted to say thank you Danilo for a very useful addendum to the PB arsenal.
My psychiatrist also wanted to thank him...

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sun Mar 08, 2015 11:45 pm
by Demivec
Blue wrote:I'm late to the party, i know, but i just discovered this great hiliting tool by Danilo.
And i really wanted to say thank you Danilo for a very useful addendum to the PB arsenal.
My psychiatrist also wanted to thank him...
@Blue: Danilo's tool was useful. This type of highlighting is currently part of the PureBasic IDE. The IDE just requires to to select the text and then highlights it everywhere in the source, no key-presses necessary.

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Mon Mar 09, 2015 12:50 am
by skywalk
Danilo's highlight is persistent. The IDE unhighlights once you move the cursor. Room for both modes but I prefer persistent since my code doesn't always fit on 1 screen.

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Mon Mar 09, 2015 9:03 am
by Blue
@Demivec : As Skywalk pointed out, the difference between the built-in hiliting and Danilo's method is important.
I don't find the built-in method at all useful, since it only provides a fleeting glance at the occurences of whatever you hilite.
With Danilo's way, you can visually follow your tracks across your code screens.

Try it, and you'll be hooked.

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Mon Feb 27, 2017 4:42 pm
by #NULL
great tool, thank you!

compared to the built-in IDE feature, this one also works inside strings, with parts of words / any selection, and most importantly it doesn't get confused by *asterisks and @-signs etc.

Re: PB IDE Smart Highlight (showing selected text) implement

Posted: Sat Apr 02, 2022 9:59 am
by BarryG
Danilo wrote: Sat May 19, 2012 3:37 pmreplace the PureBasic\Compilers\Scintilla.dll with a Scintilla.dll from the file above
Just discovered I don't need to replace Scintilla.dll for your tool to work; so PureBasic must now have a version that supports it.