Add search to FileGoTo command

Ideas for new features

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
IanOfYork
Posts: 93
Joined: Sat Nov 04, 2017 11:54 am
Location: York, England

Add search to FileGoTo command

Post by IanOfYork »

Currently, the command FileGoTo (for me, mapped to ctrl-shift-G) takes the current selection as a filename and opens the file. The command is flexible enough to expand the selection to find a filename or just take the filename around the current cursor.

The command also allows the file to be opened at a specific line: W:\wip\project-abc.txt(44) which opens the file at line 44.

It will also allow for a column number: W:\wip\project-abc.txt(44,12)

The above is fine for a fairly static file, or a log file that only grows at the end.

Please could there be an option to open the file and search for a specific string. Something like: W:\wip\project-abc.txt(/subsection title/)

I also open log files at the end via: W:\wip\project-abc.txt(99999)
so it would be "tidy" to add a cleaner syntax like:
W:\wip\project-abc.txt(eof) or W:\wip\project-abc.txt(end)
IanOfYork
Posts: 93
Joined: Sat Nov 04, 2017 11:54 am
Location: York, England

Post by IanOfYork »

Please can this also apply to starting textpad from a command line.
User avatar
AmigoJack
Posts: 482
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

I guess this feature only exists because the "search in file" result list just looks like that: filename + brackets with numbers in it per line. And search results never need relative offsets like "eof" or "first search match of x".

If it would come from the CTRL+G feature it would also include "go to byte" or "go to page". And halfway in context to this I miss the simple commands like "go to start/end of file" so I can also assign alternative key combinations instead of sticking to CTRL+HOME and CTRL+END.

The help explains under "Command Line Parameters" a third variant:
If the filename to be edited (not printed) is followed by "(<line>[,<col>])", with no intervening spaces, the file will be opened with the cursor at that position. If <line> is a hex number (eg. 0x1a22), a hex view of the file will be created, with the cursor at that address.
Post Reply