Here is a command that i added to my XCode bundle to set a breakpoint
in the front most file. Note that this assumes that the project is
open in XCode. Thanks for the help on this list to make this work. In
case you are wondering why the name of the file and not the path
name.. The file reference type for XCode uses the name of the source
file only.
#!/usr/bin/env ruby
# import the frontmost opened project window in Xcode
proect = %x{"#{ENV['TM_BUNDLE_SUPPORT']}/bin/find_xcode_project.rb"}
named = File.basename(proect)
xCodeProject = named.sub(/\.(xcodeproj|xcode|pbproj)\/?$/, "").chomp
%x{osascript -e 'tell application "TextMate"
set myName to name of front document
end tell
tell application "Xcode"
tell project named "#{xCodeProject}"
set bp to make new file breakpoint with properties {line
number:#{ENV['TM_LINE_NUMBER']}}
set file reference of bp to file reference named myName
set enabled of bp to true
end tell
end tell'}
Tried to use the TODO bundle and it was taking an age (10s of
seconds) to give me a result. Some puts in the command code showed
it was parsing all the text files in the directory and sub
directories that the project file resided in. These files are a
super set of the ones in the project draw - I only expected it to
search in the project specific files. As a contrast using the 'find
in project command' to search for TODO returns instantly.
Dave.
There seems to be a bug in the Find function within the Bundle Editor.
1. Launch TextMate
2. Open the Bundle Editor
3. Navigate to, for instance, the C Grammar
4. Perform a Find for "function.c"
5. Perform a Find for "prototype"
6. Close the Bundle Editor and/or the Find window, reopen and try again.
7. Make a sad face
Sometimes, if I close both the Bundle Editor and Find windows, it
works, but usually not.
Oh, I just did an archive search and see that this was reported in
January. Well, maybe it was forgotten? *bump*
Cheers & thanks - this software is really great.
jb
Hi all,
I made some snippets using conditional
insertions for my declarations in Fortran.
For example, I have this one :
real*${1:8}${2: a/d}${2/(,a)|(,d)/(?1:llocatable)
(?2:imension)/}${2/,a|(,d)/(?1:\(\))/} :: ${3:name}${2/,d|(,a)/(?1:\(\))/}
$0
which does that :
http://guerom00.free.fr/clutter/Cond_insert.mov
What I would like to do is, in the “allocatable” or
“dimension” case, that the caret goes between the
braces after I type in the name.
In the snippet definition, that would be to somehow
define a $4 key but I really don't know how to do this...
Any help is much appreciated :-)
PS : Once again, due to my poor knowledge of RegExp,
if anyone has some suggestions/improvements for this
snippet, he is quite welcome :-D
Hi,
I found two sound files at /Applications/TextMate.app/Contents/
SharedSupport/Support/Sounds .
What are they for? I've been using TextMate for a while, but never
encounted them.
I can't sleep well until I get to know what they are. Searched this
list, to no avail.
This question might not *sound* useful, but what are the sounds for?
Takaaki
--
Takaaki Kato
http://samuraicoder.net
I have been working on the following script to set breakpoint is
XCode. I am not a Ruby expert and I am sure I am doing something
wrong. Any help would be appreciated.
Currenly my script looks like so:
proect = %x{"#{ENV['TM_BUNDLE_SUPPORT']}/bin/find_xcode_project.rb"}
named = File.basename(proect)
xCodeProject = named.sub(/\.(xcodeproj|xcode|pbproj)\/?$/, "")
breakLine = #{ENV['TM_LINE_NUMBER']}
print xCodeProject
astring = "osascript -e \'tell application \"TextMate\"
set myName to name of front document
end tell
tell application \"Xcode\"
tell project named \"#{xCodeProject}\"\r\n
set bp to make new file breakpoint
set file reference of bp to file reference named myName
set enabled of bp to true
end tell
end tell\'"
print astring
%x{#{astring}}
My output is:
iPhoto2PBase
osascript -e 'tell application "TextMate"
set myName to name of front document
end tell
tell application "Xcode"
tell project named "HelloWorld
"
set bp to make new file breakpoint
set file reference of bp to file reference named myName
set enabled of bp to true
end tell
end tell'
For some reason i have a bunch of white space after my project's name.
Also how do i put { and } into a string so they are printable?
Hi,
I really appreciate TextMate's implementation of Documentation. If
I'm correct, most of them are just webpages created by searching on-
line and/or creating HTML on the fly.
It would be great if, in the window, I could use a) Command-LeftArrow
and Command-RightArrow, b) Command-[ and Command-] and/or c) open in
browser.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
Hi all,
I would like to be able to
colorize, or otherwise distinguish, folded
text when it is folded. I find it hard to spot
in a program full of folding markers.
A folding marker “collapsed” of a completely
different color than the folding markers
“start” and “stop” might be sufficient...
TIA
All,
I've been playing with Textmate but haven't been able to do something
very simple (in my view) - write an Applescript that lets me get the
content of the frontmost Textmate document. This must be possible,
right?
If you could send me a pointer or a short example, that would be much
appreciated.
Thanks,
Thomaz
Hi, I just downloaded the experimental wiki bundle, and am getting
the following error:
Not Found
The requested page was not found.
Page: file://localhost(null)
Thanks.
All the best, Mark
_________________
Mark Eli Kalderon
Department of Philosophy
University College London
Gower Street
London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy
Personal wepage: http://www.kalderon.demon.co.uk