PB IDE Smart Highlight (showing selected text) implementatio
Re: PB IDE Smart Highlight (showing selected text) implement
Scintilla.dll and SciLexer.dll binaries for 32bit and 64bit, compiled with latest Intel C++
and Microsoft VC++ 2010: Scintilla310.zip (3.40MB)
Just replace the PureBasic\Compilers\Scintilla.dll with a Scintilla.dll from the file above,
just choose the right version (32/64bit).
The last in-memory highlighting code works with this Scintilla.dll versions.
and Microsoft VC++ 2010: Scintilla310.zip (3.40MB)
Just replace the PureBasic\Compilers\Scintilla.dll with a Scintilla.dll from the file above,
just choose the right version (32/64bit).
The last in-memory highlighting code works with this Scintilla.dll versions.
- Zebuddi123
- Enthusiast
- Posts: 796
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: PB IDE Smart Highlight (showing selected text) implement
@ Tenaja thanks for bringing the question to the forum
@ Danilo
Works great Just what the doctor ordered !!!
Thanks for sharing
Zebuddi.

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

malleo, caput, bang. Ego, comprehendunt in tempore
Re: PB IDE Smart Highlight (showing selected text) implement
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?
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?
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: PB IDE Smart Highlight (showing selected text) implement
Works here with original PB Scintilla.dllc4s 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?
"%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
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!
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!

If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: PB IDE Smart Highlight (showing selected text) implement
Not possible, as the code does not use %TEMPFILE (ProgramParameter(0)).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)!

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
Re: PB IDE Smart Highlight (showing selected text) implement
@Danilo
How would Homer Simpson say? D'oh!
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
How would Homer Simpson say? D'oh!

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
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: PB IDE Smart Highlight (showing selected text) implement
Thanks Danilo!
Really helpful stuff to build additional IDE tools.
Really helpful stuff to build additional IDE tools.

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: PB IDE Smart Highlight (showing selected text) implement
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...
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...
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: PB IDE Smart Highlight (showing selected text) implement
@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.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...
Re: PB IDE Smart Highlight (showing selected text) implement
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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: PB IDE Smart Highlight (showing selected text) implement
@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.
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.
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: PB IDE Smart Highlight (showing selected text) implement
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.
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
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.Danilo wrote: Sat May 19, 2012 3:37 pmreplace the PureBasic\Compilers\Scintilla.dll with a Scintilla.dll from the file above