Open file on Substring (just like Open File on Line Num)
Posted: Sun Dec 12, 2004 8:42 pm
Currently, TextPad allows you to open a file to a specific line number
if you press ctrl+shift+g on a properly formatted link:
This is a great feature!! It allows you to instantly 'jump'
to a specific location in a file.
PROBLEM:
Sometimes the line number is not an adequate way to reference
a specific location in a file. Sometimes it would be better to
'jump' to the first occurance of a specific substring. That way,
if you edit the file, you do not have to worry about the changing
line number.
if you press ctrl+shift+g on a properly formatted link:
Code: Select all
### here we invoke the GetUserName() function
### which is documented at
### href="c:/docs/myprogs/FooProgram.scu(389)"
GetUserName()
(Using this fake code as an example, the user can open
the file "FooProgram.scu" by ctrl+shift+g with the cursor
over the 'href' line ... the file will open focused on the exact
line specified in the href ... line 389)
to a specific location in a file.
PROBLEM:
Sometimes the line number is not an adequate way to reference
a specific location in a file. Sometimes it would be better to
'jump' to the first occurance of a specific substring. That way,
if you edit the file, you do not have to worry about the changing
line number.
Code: Select all
### here we invoke the GetUserName() function
### which is documented at
### href="c:/docs/myprogs/FooProgram.scu`GetUserName`"
GetUserName()
(clicking ctrl+shift+g will take you to the first occurance of GetUserName
in the destination file)