SWI-Prolog Bundle
- Comments:
- here.
I’ve cloned and updated the included Prolog bundle to use my Run script.
This can be found at GitHub: SWI-Prolog.tmbundle.
I’ve cloned and updated the included Prolog bundle to use my Run script.
This can be found at GitHub: SWI-Prolog.tmbundle.
In the continuing effort to do ‘productive’ tasks, but not actually the project I am supposed to be working on, I present a TextMate command to run the current prolog file, with nice HTML output, and input via a dialog box.
|
|
It would be cool to be able to run my Django tests from within TextMate.
Update: this version will run just the tests from the active file, if there are any. Otherwise, it runs all of the tests in the whole project.
Here is a Command to do just that:
|
|
I seem to recall my internet going down, and then coming back up, at around the same time every night.
Tonight it flaked at 8:21pm.
I didn’t realise until today that there was a part of iTunes Genius that makes suggestions when browsing the iTunes store.
I went to click on one item, and got:
Now, why would you go and recommend something you can’t give me? That is just plain mean!
Using TextMate, it is very easy to get snippets and commands to do things that you often do. However, the python bundle is a bit lacking, and this is a great opportunity to improve that.
I’ve created a Command that will enter a newline, and if not inside a list, function call, dictionary or multi-line string, automatically add a trailing .
I’ve hooked it in to the Enter key, and the other settings can be seen in the screenshot below:
The actual code follows:
|
|
I’m loving coding in TextMate - it makes ruby much more fun. And python, too.
It integrates really well with heaps of other tools, including my diffing app of choice (Changes.app), and my preferred DVCS (Mercurial).
It even has its own Commit pane that appears when you choose to commit. There is one problem with it, however. Invariably I have made a change to a file and can’t remember exactly what it was. You can’t view the changes using the Mercurial bundle and Changes, and leave that window open while you commit. So, I end up having a terminal window open that I type hg chdiff into.
Instead, we should be able to quickly see the changes made to the working copy. Perhaps using a button like below:
Of course, that’s just a mockup (although it is done in IB) - the button is not connected up to anything. I have no idea how to reverse engineer the Commit.app to do this. But it would be cool.
Update: It appears all you have to do is tell the CommitWindow.app tool that you want to use --diff-cmd "hg,diff", and it is all done.

The active tab looks wrong.
Inactive tabs not so much.
![]()
Note for future reference: especially since the data migration script I was running today was running out of memory and crashing.
You can use slice notation, which limits the query:
>>> for p in db.query(Person)[:10]:
... print p
This rocks.