Is there any command to "find all" matches in the current document?
One of the workarounds is to use the 'Find in files' and point to the current file.
The other workaround is to use the 'Mark all'. But you have to broswer the whole document to find all of matches. How to clean the marks?
None of the workarounds works well.
Any solutions?
'Find All' in the current document?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 26
- Joined: Tue Mar 04, 2003 7:33 am
I use fgrep for this purpose.
1) Get fgrep. For example from http://unxutils.sourceforge.net/
2) Set up a command-shell-tool in TextPad with parameter:
fgrep -n "$SelWord" $File
I have set a regular expression for jumping to a row:
^\([[:digit:]]+\):
Invoke the tool with something selected and you get all occurences of that in the output window.
HTH
1) Get fgrep. For example from http://unxutils.sourceforge.net/
2) Set up a command-shell-tool in TextPad with parameter:
fgrep -n "$SelWord" $File
I have set a regular expression for jumping to a row:
^\([[:digit:]]+\):
Invoke the tool with something selected and you get all occurences of that in the output window.
HTH
-
- Posts: 2
- Joined: Tue Nov 09, 2004 2:04 am
-
- Posts: 26
- Joined: Tue Mar 04, 2003 7:33 am
Well, that's why I have the "^\([[:digit:]]+\):" part. I put that in the field for "regular expression for jumping..." and selected "1" at the drop down box for "line". That works fine. Double-clicking (or Return) on a line in the output-window jumps to the appropriate line in the text document.
Mind that sometimes you have to close the output window and start the tool again so the output window opens again so that certain changes for a tool take effect. So the safest way is to close the output window make your changes at the tool and invoke it again.
Another possibility is that yout fgrep produces another output. Mine looks like this:
Line number followed by the line that contains the search string.
HTH
Mind that sometimes you have to close the output window and start the tool again so the output window opens again so that certain changes for a tool take effect. So the safest way is to close the output window make your changes at the tool and invoke it again.
Another possibility is that yout fgrep produces another output. Mine looks like this:
Code: Select all
125: test text
312: this is a test text
HTH