Programmers editor with...?
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Programmers editor with...?
Hi All,
I'm looking for a text editor supporting (besides file name) a search expression as command line parameter and if it is found, position the cursor there.
I'm googled this, but found nothing...
TIA.
I'm looking for a text editor supporting (besides file name) a search expression as command line parameter and if it is found, position the cursor there.
I'm googled this, but found nothing...
TIA.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- serge_girard
- Posts: 3176
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Programmers editor with...?
We had one on the mainframe: SPF
I have a very very old DOS SPF-PC version, I don't know if it is still working...
Serge
I have a very very old DOS SPF-PC version, I don't know if it is still working...
Serge
There's nothing you can do that can't be done...
Re: Programmers editor with...?
Roberto,
Why not create your own using the wonderfull:
c:\hmg.3.4.3\SAMPLES\HFCL\WordScribe
Theo
Why not create your own using the wonderfull:
c:\hmg.3.4.3\SAMPLES\HFCL\WordScribe
Theo
Re: Programmers editor with...?
I sometimes still use an old DOS-based program called XyWrite (from about 1987?) from a company called XyQuest.I'm looking for a text editor supporting (besides file name) a search expression as command line parameter and if it is found, position the cursor there.
It's an amazing piece of software, blindingly fast, entirely command-line driven (which is maybe why it never really caught on?) and I think it will do exactly what you're looking for.
I just Googled it and there seem to be Windows versions. I haven't tried them, but they might be a good place to start your search.
Good luck
Re: Programmers editor with...?
Maybe this...
https://www.powergrep.com/manual/commandline.html
o with
findstr /l /n /c:"Darwin" *.docx ...... and somehow open the editor
https://www.powergrep.com/manual/commandline.html
o with
findstr /l /n /c:"Darwin" *.docx ...... and somehow open the editor
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Thanks for all the answers.
Some of you could be wandering why I'm asking for this...
I have a big project (more than 400 prgs).
It was created with IDE. So, each event procedure has its own prg file (I'm the culprit of this ).
This approach is very useful and worked fine... until...
I've integrated (joined) this project with another one, so the total prg count raised to about 600...
Then... the project can't be built anymore (building process simply does not work).
Since I've was very rushed (I've needed to make work the new integrated project in a couple of days) I've simply put all the prgs of the new project together in only one.
Then, all worked well, but, since the project is in permanent expansion (five years and counting) every time I add a new event procedure, I must do it manually, to a big prg containing all new ones.
So... jump to the exact point in the file, specifying the procedure name as a parameter could be very helpful...
I'll try your suggestions... Thanks again.
Some of you could be wandering why I'm asking for this...
I have a big project (more than 400 prgs).
It was created with IDE. So, each event procedure has its own prg file (I'm the culprit of this ).
This approach is very useful and worked fine... until...
I've integrated (joined) this project with another one, so the total prg count raised to about 600...
Then... the project can't be built anymore (building process simply does not work).
Since I've was very rushed (I've needed to make work the new integrated project in a couple of days) I've simply put all the prgs of the new project together in only one.
Then, all worked well, but, since the project is in permanent expansion (five years and counting) every time I add a new event procedure, I must do it manually, to a big prg containing all new ones.
So... jump to the exact point in the file, specifying the procedure name as a parameter could be very helpful...
I'll try your suggestions... Thanks again.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Programmers editor with...?
How about this ... ( I got it from Google )
and it works on my PC with notepad++
=============================
script.bat ==>
@ECHO OFF &SETLOCAL
set "LineNr="
for /f "tokens=1*delims=[]" %%a in ('^<"%~1" find /i /n "%~2"') do if not defined LineNr (
set "LineNr=%%a"
SET "Line=%%b"
)
if not defined LineNr (
set "LineNr=1"
SET "Row=1"
GOTO :launch
)
CALL SET "Right=%~2%%Line:*%~2=%%"
CALL SET "Line=%%Line:%Right%=%%"
FOR /f "delims=:" %%a in ('"(echo("%Line%"&@echo()|findstr /o $"') do SET /a Row=%%a-4
GOTO :launch
:launch
START /b CMD /c ""c:\Notepad++\notepad++.exe" -n%LineNr% -c%Row% "%~1""
===================================
a_serch.bat ==>
C:\___HMG\script.bat "c:\_order\PPP_EDIT.Prg" "IF EMPTY(cPrvID)"
======================================
and it works on my PC with notepad++
=============================
script.bat ==>
@ECHO OFF &SETLOCAL
set "LineNr="
for /f "tokens=1*delims=[]" %%a in ('^<"%~1" find /i /n "%~2"') do if not defined LineNr (
set "LineNr=%%a"
SET "Line=%%b"
)
if not defined LineNr (
set "LineNr=1"
SET "Row=1"
GOTO :launch
)
CALL SET "Right=%~2%%Line:*%~2=%%"
CALL SET "Line=%%Line:%Right%=%%"
FOR /f "delims=:" %%a in ('"(echo("%Line%"&@echo()|findstr /o $"') do SET /a Row=%%a-4
GOTO :launch
:launch
START /b CMD /c ""c:\Notepad++\notepad++.exe" -n%LineNr% -c%Row% "%~1""
===================================
a_serch.bat ==>
C:\___HMG\script.bat "c:\_order\PPP_EDIT.Prg" "IF EMPTY(cPrvID)"
======================================
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Works nicely and extremely fast.Tiger wrote:How about this ... ( I got it from Google )
and it works on my PC with notepad++
In a 35000 lines prg it found a procedure name near the last line almost instantly.
Thanks!
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Programmers editor with...?
I use FNR, link below to find anything
You click on result files open for editing with associated program, it search sub directory also
https://findandreplace.codeplex.com/
You click on result files open for editing with associated program, it search sub directory also
https://findandreplace.codeplex.com/
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Trying to solve this at Harbour level (I mean, find the line number for a search string to pass it as a parameter to the editor) resulted extremely slow for large files, at least, using the unique method I know to do that:Tiger wrote:How about this ... ( I got it from Google )
and it works on my PC with notepad++
=============================
script.bat ==>
@ECHO OFF &SETLOCAL
set "LineNr="
for /f "tokens=1*delims=[]" %%a in ('^<"%~1" find /i /n "%~2"') do if not defined LineNr (
set "LineNr=%%a"
SET "Line=%%b"
)
<...>
C:\___HMG\script.bat "c:\_order\PPP_EDIT.Prg" "IF EMPTY(cPrvID)"
======================================
Code: Select all
cBuffer := MEMOREAD('very.large.file.prg')
cSearch := 'MyProcedureName'
nLines = MLCOUNT( cBuffer , 80 )
FOR nCurrLine = 1 TO nLines
cTemp := MEMOLINE( cBuffer , 80 , nCurrLine)
IF cSearch $ cTemp
MSGINFO( STR( nCurrLine ) )
EXIT
ENDIF
NEXT
TIA
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)