So I was in IRC asking Allan about this earlier today, but he said it was
still working in Leopard and
I could look in the source for any Snow Leopard issues (I've been
developing off and on with SL).
Well, I'm back on my Leopard side and it's broken here too. I
reinstalled the InputManager and still a no-go. It beeps at me when I
try to use the command (but as in SL, the bundle IS loaded as I can
see the command is there.)
So is anyone else suffering from a break with the "Edit in TextMate"
InputManager? I'd figured I'd poll the group at large before I start mucking
around or write it off as a non-working hack at this point.
-- Jesse
>> I got a HTML + CSS bundles that a few people use and I've been asked
>> to put them on github... So I'm looking into how you do that.
>> Ideally,
>> I'd like to just edit my bundles in TextMate, and push the update to
>> github when I come up with new snippet improvement, command, bug fix,
>> etc... But that mean I need to combine both of those (using mCSS as
>> example) first right?:
>>
>> ~/Library/Application Support/TextMate/Pristine Copy/Bundles/
>> mCSS.tmbundle
>> ~/Library/Application Support/TextMate/Bundles/mCSS.tmbundle
>
> I can?t see how this is related to git; don?t you have to do that
> anyway when you make your bundle available anywhere?
It's not directly related to git. I was just giving a little bit of
context so that people can understand what I'm trying to do. Now I can
see how my email subject might not be optimum... sorry.
>
>> How do you guys do it?
>
> I keep the bundles I hack on completely in ~/.../TextMate/Bundles, and
> those I mainly just _use_ in ~/.../Pristine Copy/Bundles. That way,
> editing my own bundles in TextMate changes exactly the files I want to
> push out, while my changes to other bundles is kept outside of their
> source tree and won?t lead to merge conflicts.
>
> Going back to git, when you create a repository on GitHub it gets you
> to a page containing step by step instructions for getting your source
> tree or local repository into the new remote repository.
I'm not asking help on how to create a git repo or using github etc.
That's fine... What I'm not clear about is how you manage the workflow
so that you don't have to copy the bundles to a different place and
just make the bundles you're using within TextMate repos themselves.
Or if you shouldn't do that at all? How do you "keep the bundles I
hack on completely in ~/.../TextMate/Bundles"? Do you manually copy
from the pristin/ folder first? Because the ~/.../TextMate/Bundles
only contains the changes you've made to~/.../Pristine Copy/Bundles
right? So you can't just push that without including what in Pristine
too. Or am I over thinking this somehow?
Thanks again!
Sorry for the noob question but...
I've just started getting into Git yesterday... (finally...) and I
can't quite figure out the best workflow to keep bundles on github up
to date.
I got a HTML + CSS bundles that a few people use and I've been asked
to put them on github... So I'm looking into how you do that. Ideally,
I'd like to just edit my bundles in TextMate, and push the update to
github when I come up with new snippet improvement, command, bug fix,
etc... But that mean I need to combine both of those (using mCSS as
example) first right?:
~/Library/Application Support/TextMate/Pristine Copy/Bundles/
mCSS.tmbundle
~/Library/Application Support/TextMate/Bundles/mCSS.tmbundle
How do you guys do it?
I did google it, but whatever I try I get a million posts talking
about bundles on Github and not how they actually get there...
I'm pretty shaky on Git still, so I understand if you don't have time
to explain the specifics, what I'd like is a general idea of the
workflow... I can research the rest. Thanks for any pointer!
Allan, Ciarán, all,
I used the phpdoc snippets a lot in TextMate. I also go back and add
to those phpdoc blocks. When I go back and edit those blocks TextMate
doesn't provide any help.
I created a command and snippet to help:
The Command provides Auto complete when you use a @ in a phpdoc comment.
The second file is a snippet for when you hit enter it puts an
asterisk at the start of the next line.
Timothy
I'm making some custom templates (among other things) for my favorite
languages, and I need some advice/best practices about them.
1. I heard that people are moving away from normal Templates and towards
Snippets for this purpose; is this correct?
2. One advantage I see with Snippets is that it lets me set the filename
(which I can then use) before calling the Snippet, which is not possible
with a Template unless I'm in a project. Is there some way around that with
Templates?
3. As I make these Templates, I'm finding a lot of common text between them,
and when I want to tweak it across the board...well, it's like programming
without functions. What, if anything, can I do to reduce redundancy in my
templates?
Thanks,
Neil.
In developing my bundle, I've been issuing feedback to the user with Create
New Document. Now that things are working decently, I want to switch to Show
As HTML. Here's the problem. Throughout my routines, when I want to issue
some feedback, I just say "puts". Now, however, using Show As HTML, I want
to wrap this in some way such that every time there is a "puts" I grab it,
shove a <br> on the end, and pass it along, so that my output appears
streaming into the HTML window as the script runs.
So, yeah, I could look thru all my code, find every "puts", and append the
<br> myself. But I don't want to. I want to just wrap up what I'm already
doing and perform the transformation as the input appears. There must be
some simple way to do this.
Here's what I have so far:
def self.perform(command_name, *args)
require "#{ENV["TM_SUPPORT_PATH"]}/lib/web_preview.rb"
STDOUT.sync = true
html_header(command_name.to_s)
puts "<pre>"
self.send(command_name, *args) # FIX ME
puts "</pre>"
html_footer()
end
It's that "self.send" line that I want to wrap up in some way so that I can
intercept the output from each "puts" within my routines and modify it.
Oh, and while we're up: is there a way I can detect whether we are currently
set to Create New Document or Show As HTML? I'd like to funnel all my
commands thru this one bottleneck but NOT do all that stuff if we are set to
Create New Document (in that case I just want to pass the output thru
untouched).
Thx! m.
--
matt neuburg, phd = matt(a)tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
Hi guys,
I just started using Textmate recently and at the moment I am trying to get
some Python scripts working with it. Everything works great but I was
wondering how to you pass command line arguments to a python script when you
run it?
Thanks
Regards
David
Ah ok thanks,
Although it might not be a bad idea to have a different meant to run
it by expanding the python bundle to "Run scripts with Arguments"
Thanks again for a possible solution.
Regards
Dave
On 9 Jul 2009, at 19:53, textmate-request(a)lists.macromates.com wrote:
> There is no support for this, it?s not that we don?t want to provide
> it, just that it?s not really feasible to do without bringing up a
> dialog and that would be a pain for the 99% where you don?t want to
> provide arguments.
>
> What you can do is simply read from stdin then TextMate will show a
> dialog, this is how I handle it in most of my scripts, i.e. read the
> arguments from stdin instead of command line options (when I know I
> mostly run the script in TM).