04.20.06
Posted in TextMate at 11:29 pm by Haris
In the previous post I talked a bit about the Spreadsheet bundle. Now it is ready for some beta testing! Here’s a small screencast demonstrating some basic functionality. The syntax for the expression is similar to the standard Spreasheet syntax. You can use dollar signs also, to indicate cells that do not change.
Update 3 Here’s a new screencast, for the updated bundle. Please update to the new version, it’s very much improved.
Here are the files. Sorry, not much documentation yet, but feel free to post your questions here. Here’s a screenshot:

Update 1: I should mention that I am using vertical bars “|” for the cell delimiters, instead of tabs, because tabs did not allow for the textmate variables accurately describing the cell that the cursor is located at. Also, if you want to color the cells and the delimiters then you’ll want to set colors for the scopes “meta.cell” and “meta.cellend.tab” respectively. Finally, you can have comment lines that start with the hash symbol “#”.
Update 2: I just updated the bundle, and it now has a lot more ruby support. First off, you can have it execute one liners of the form “%r aRubyCommandHere”. There are executed by the Spreadsheet instance. You can access the data by calling data. So “data[4][5]” will return the entry in E5. To set values, use set_data. so both “set_data([4,5],28)” and “set_data(”E5″,28)” will set the value of E5 to 28. Atm the whole program must be in one line I’m afraid.
The other way is to add to the built in functions. The file commands.rb contains the module ParserDelegateMethods. This module is being loaded into ParserDelegate. If you add to this module a command like:
def foo(array)
dosomethingwitharrayandreturnvalue
end
then in your files you could use FOO(2,3,4) to call this command.
IMPORTANT: This new version of the bundle requires vertical lines at both ends of the table. Running the reflow command should add those automatically.
Later
Permalink
04.17.06
Posted in TextMate at 11:00 pm by Haris
For a while now I’ve been using spreadsheet programs for very simple tasks, namely keeping grade records for my classes, and it frustrates me how over-bloated they are. Given my modest needs, all one would need is a decent editor, and an appropriate grammar to emulate a basic spreadsheet, right? Well, we’ve got a great editor, so all that was left was the syntax. Here is a screencast demonstrating the first steps toward such a syntax and tools around it. It’s very sort, only 30 seconds, more of a “proof of concept” kind of thing. I should point out that moving around is done via the enter and tab keys combined with shift for backward movement, but of course they are customizable. The Spreadsheet Bundle is a work in progress and not yet ready for the repository, but if anyone is interested in playing with it, or helping out in general, please email me or post a comment.
Later
Permalink
04.12.06
Posted in TextMate, ruby/rails at 11:43 pm by Haris
Since the actual page does not accept comments, this entry is for you to post your comments on the ScopeHandler class. Fire away!
Current version: 1.2 Added RDoc support.
Current version: 1.2.1 Added nodesWithScope method. Example: handler.nodesWithScope("comment").
Later
Permalink
04.11.06
Posted in Uncategorized at 7:22 am by Haris
Yes, you heard me correctly! My email Inbox is now empty! It is an extremely joyful moment, and i couldn’t have done it without the gentle nudges of 43 folders, especially their Inbox zero series. Thanks Merlin!
Four days ago my inbox was not huge by any sense of the word, a mere 800 messages, 130 of them marked as unread. At that point, unread meant that these are things I might have/need to deal with, and read meant things I might want to keep, but basically I was too lazy to place elsewhere.
So my job was not too difficult. I created two folders, one called Archive and another called Deferred, and each day went through 200 emails, figuring out if I need to act on them (Deferred), need them for reference possibly (Archive), or don’t need them any more (Trash). I didn’t really deal with any of the actionable emails mind you, I just moved them to a more appropriate location, to be dealt with later.
So to all the kids out there with a large cluttered inbox: Don’t use it as an archive/todo list. Move these items to designated locations. And do it now, not tomorrow. As an added benefit, your email client will be much faster. Most importantly, you will be in control, knowing exactly what items you still need to deal with. (Yey for GTD!)
It feels so good to be free!
Later
Permalink