In TextMate 1.5.3 (1202) the shortcut to see the DB schema of a model
in Rails (that's a recent addition, see Rails -> Models -> Show DB
Schema for Current Class) coincides with the one for "Save Project
As...".
-- fxn
Hello all,
I'm starting to set up my environment to use TextMate instead of XCode's built in editor.
The one thing I miss from XCode is its Code Sense. I really like having a quick reference of the API command I want. I know I want, say, to use CFBundleCopyResourceURL(), but I don't remember what to feed it.
Since XCode doesn't provide a way to query for that information (thanks, Apple), I had to get it "another way". It seems that the easiest way to do that is to grep the framework header files myself.
My script takes the selected word, finds it in the 10.4u SDKs, then makes a txmt:// style URL out of it, so you can click the link and go right to the proper line in the proper header file.
The script is posted below. Hopefully it will be useful to you Carbon programmers out there, or maybe the kind Unix hands will see some optimization I can use to make it faster.
_______________________________
find -L /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/*/Versions/Current/* | xargs grep -I -n $TM_SELECTED_TEXT | python -c "import fileinput, re
ourRe = re.compile(r'(.+?):(.+?):(.+)')
for each in fileinput.input(['-']):
res = ourRe.match(each)
if res:
print '''<p><a href='txmt://open/?url=file://%s&line=%s'>%s</a></p>''' % ( res.group(1), res.group(2), res.group(3) )"
_______________________________
Enjoy all!,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
Hi folks:
I am new to textmate and to the list. I have spent awhile with the
manual but either I missed this or it is not in there (or maybe it
can't be done).
I keep all my zsh configuration files in /Library/init/zsh
These include various files that are sourced, as well as shell script/
function files. Since the latter have #!/bin/zsh at the top,
textmate does the right thing, but I would also like the other files,
that set up my environment, define aliases, and so forth, to use the
same syntax highlighting, even though they do not have #!/bin/zsh at
the top.
Is there a simple way to do this?
Thanks.
Bill
I thought it might be for choosing images but I have no clue, and I
can't seem to get it to do anything besides open an output window
with an error when I invoke it.
Can anyone help clue me in?
Neil
---
hushBOOM design
Web design, development & hosting -- Writing & Editing
http://www.hushboom.com/
In hopes of figuring the language-sensitive parser out, I've been
trying to make a grammar for .ini files. It appears my
incomprehension is stark, as I can't get any satisfaction out of the
grammar
{ scopeName = 'text.ini';
fileTypes = ( 'ini' );
foldingStartMarker = '^\[';
foldingStopMarker = '.(?=^\[)';
}
... which I think specifies a folding range from the opening [ of a
section, running to the character before the [ that begins the next
section. TextMate puts a fold marker next to the section line, but no
matching marker at the bottom of the section. Clicking the fold
button has no effect.
(Yes, the stop marker doesn't account for the end-of-file that closes
the last section, but one challenge at a time.)
What am I missing?
-- F
Hello there
Has anyone thought about a language definition for the Lout document
formatting system?
I may write one myself, but I'm a bit nervous about it since Lout has
an awkwardly wide range of ways of indicating the beginnings and ends
of things.
For example, a document header for a report might look like:
@SysInclude { tbl }
@SysInclude { report }
@Report
@Title { Blah blah }
@Author { Alaric Snell-Pym (alaric(a)snell-systems.co.uk) }
@Institution { Snell Systems }
@InitialLanguage { EnglishUK }
@DateLine { June, 2006 }
@PageHeaders { Titles }
@InitialSpace { tex }
@Abstract { In this specification, we describe a blah blah blah. }
//
...with the mysterious "//" ending the metadata section.
Things like chapters, appendices, sections, subsections, and so on
are delimited like so:
@Section
@Tag { documentcontrol }
@Title { Document Control }
@Begin
...content...
@End @Section
While paragraphs don't have an explicit end, they are just separated
with "@PP" markers:
@PP
This is a pargraph of text, blah blah blah
@PP
This is the next paragraph! Whodathunk?
Figures, and many other such block-level objects, have no defined
ending:
...text...
@Figure
@Caption { The prototype }
@IncludeGraphic prototype.eps
...text...
While bulleted lists have an explicit @EndList marker, but each list
item is delimited with curly braces:
@BulletList
@ListItem {
3x resistor at 4p each
}
@ListItem {
1x AVR micro-controller at @Sterling""1.92 each
}
@ListItem {
1x IrDA transceiver module at @Sterling""2.33 each
}
@ListItem {
1x 3.6v NiMH battery at @Sterling""2.62 each
}
@ListItem {
2x LED at 25p each
}
@ListItem {
1x Charging connector at 57p each
}
@ListItem {
1x socket for AVR micro-controller at 5p each
}
@ListItem {
1x PCB at 9.75 Euros each, or about @Sterling""6.67
}
@EndList
It's all rather messy! I suspect I'd be busy for days finding new
ways to delimit scopes!
TIA,
ABS
--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/categories/alaric/
Any snippet that can type all that ugly code for me? I tried
dragging the .swf into my html like you do with images but that just
wrote some *really* ugly code (binary data). Do I actually have to
fire up - gag - cough - choke - Dreamweaver to do this?
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
Hi Sean,
> Thanks Ben -- I think my situation may be different though. My app
> isn't writing any logs.
>
> Any other thoughts?
>
> Sean
I have the problem on my iBook, but not on my Mini. TextMate rescans
the entire project directory structure for changes *every* time the
window is focussed. To my knowledge, there is currently no way to
turn this behaviour off, except to create the project by dragging
individual files into the project, instead of whole directories. It's
a PITA, but my understanding is that will stop the project reloading
on focus. At the very least, trying it that way would help you figure
out if this is a new problem or not.
Regards,
Chris.
Ahh...see I *knew* I was missing something obvious. Thanks.
It's a little strange though that some HTML bundles (like control-
shift-W) work fine in Plain Text mode, but control-shift-L doesn't.
That's what was throwing me off.
------------------------------------
Todd Dominey :: Dominey Design
http://domineydesign.com/http://slideshowpro.net/http://whatdoiknow.org/