Hi,
many times I have the following task.
list all lines for a specific search pattern within my document and navigate to some/all lines in order to do something
OK. I do this with 'Filter Through Command' : grep -ni PATTERN ; Input: Document; Output New Document
I get a list of lines containing my PATTERN with the line number as prefix.
My question is now: Is there an elegant way to click on one line, get the leading line number, and go to that line in my main document? If clicking would be a problem drag'n'drop would also work. I looked for a command like 'go to line' but I didn't find it. Even with a macro I didn't come to grips it.
Many thanks in advance
Hans
PS Maybe it would be worth to implement this search option in TM(?)
On 16. Oct 2006, at 10:01, Hans-Joerg Bibiko wrote:
My question is now: Is there an elegant way to click on one line, get the leading line number, and go to that line in my main document?
Yes, instead of outputting in a document, use HTML as output. In HTML you can “link” to lines in your documents using the txmt: URL scheme [1].
You probably want to turn this into a command [2] instead of using the Filter Through Command….
And example of a command which does something very similar to what you need is the Show TODO List in the TODO bundle.
[1] http://macromates.com/textmate/manual/ using_textmate_from_terminal#url_scheme_html [2] http://macromates.com/textmate/manual/commands
Yes, of course!
HTML was the hint.
I thought in the wrong direction ;)
Many thanks.
Hans
On 16 Oct 2006, at 11:47, Allan Odgaard wrote:
On 16. Oct 2006, at 10:01, Hans-Joerg Bibiko wrote:
My question is now: Is there an elegant way to click on one line, get the leading line number, and go to that line in my main document?
Yes, instead of outputting in a document, use HTML as output. In HTML you can “link” to lines in your documents using the txmt: URL scheme [1].
You probably want to turn this into a command [2] instead of using the Filter Through Command….
And example of a command which does something very similar to what you need is the Show TODO List in the TODO bundle.
[1] http://macromates.com/textmate/manual/ using_textmate_from_terminal#url_scheme_html [2] http://macromates.com/textmate/manual/commands