Re: Programmers editor with...?
Posted: Sun Jul 31, 2016 8:04 am
Why can't you use the functionlist feature in Notepad++? The search box can search any function name instantly.
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://www.hmgforum.com/
I want to open notepad++ positioned exactly at a specific procedure name, without needing to do a manual search operation.Rathinagiri wrote:Why can't you use the functionlist feature in Notepad++? The search box can search any function name instantly.
Well, it depends on your definition of "faster"Roberto Lopez wrote: Is there any way to do that in Harbour faster?
TIA
Code: Select all
PROCEDURE Main()
LOCAL cSearchFor := "2009-02-14 13:25 UTC+0100"
LOCAL aLines := hb_ATokens( MemoRead( "C:\Harbour\ChangeLog.txt" ), .T. )
? Len( aLines )
// CASE SENSITIVE
AEVal( aLines, {|e,n| Iif( cSearchFor $ e, hb_Alert( cSearchFor + " found in line: "+hb_ntos( n ) ), NIL )} )
// CASE INSENSITIVE
// AEVal( aLines, {|e,n| Iif( hb_AtI( cSearchFor, e) > 0, hb_Alert( cSearchFor + " found in line: " + hb_ntos( n ) ), NIL )} )
wait
RETURN
Some of my sources are very large (around 2mb size) but significally smaller than Chengelog... so... it should work...PeteWG wrote:Well, it depends on your definition of "faster"Roberto Lopez wrote: Is there any way to do that in Harbour faster?
TIA
Please try the code below to see if it's fast enough, for your needs.
<...>
I suppose that harbour's <Changelog.txt> is a decently large file. Don't know if your .prg exceeds that size!
regards,
---
Pete
Glad to see it worked for you!Roberto Lopez wrote:Pete,
It works amazingly fast. I'm using it to search for a procedure name inside about 600 prg files (6 MB of source code) and it is nearly instantaneous.
Since I need the line number, I've used chr(13) as delimiter in hb_ATokens().
rather I myself should say thanks to you for "inventing" minigui!Roberto Lopez wrote:Thanks again.
Yes, but, sadly, those functions, are not fully docummented and there is no so much usage examples... the only way to go, is to dig on the changelog and Harbour sources...PeteWG wrote: <...>
Harbour is indeed amazingly fast for its genre (p-code languages/compilers),
just taking a closer look into the plethora of functions (particularly the hb_* family),
is usually enough to reveal all the tremendous power it offers the users.
<...>
Oh yes, documentation! an everlasting request (and a constant chance for whining ) of all Harbour users.Roberto Lopez wrote: Yes, but, sadly, those functions, are not fully docummented and there is no so much usage examples... the only way to go, is to dig on the changelog and Harbour sources...
There is some 'jewels' there, like:PeteWG wrote: <...>
In the hope it might be useful for you or anyone interested, here is the the link.
And if you'll be there, don't miss to take a look at references, for links of sites with valuable docs.
Code: Select all
hb_ADel(<aArray> [, <nPos>, <lAutoSize>])