Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under textmate...

Brian says...

I just released version 1.2 of my Textmate Trac bundle.  It includes an awesome new Preview command contributed by Tudor Marghidanu.  While editing a Trac wiki page, just hit command-option-control-p (same as Markdown, etc.) to pop up an HTML formatted preview of the page.  Seriously useful.  Thanks Tudor!

The command requires the Text::Trac perl module, which you can install from CPAN by running the following in Terminal:

sudo perl -MCPAN -e 'install Text::Trac'

If this is the first time you've used CPAN, it will probably ask you a few questions, and accepting the defaults usually works out well.

Enjoy.

Filed under: dev, textmate, trac

Brad says...

For the sake of this post let’s just assume that my desire to be write java in a text editor, and not an IDE, is justified.

My text editors of choice are first TextMate and second emacs. I use TextMate when I have the code local and emacs when not. I won’t run VNC or X Windows in order to have a UI to edit remote files. I have no tolerance for latency nor dependency on network connectivity when editing text. This is when I use emacs and most importantly screen so that if my connection dies it will be there when I reconnect.

I took a vacation from java for about a year and was quite the happy developer. As of late I’ve been back in that world. I built up an affection for TextMate and its simple expansion capabilities and wanted to give editing java in it a try. I quickly realized that I had my work cut out for me. On top of that my friends/coworkers think I’m a bit insane which I cannot deny. But I was up for the challenge and have reached a point where I’m happy, not elated but happy. There were multiple pieces of functionality that I missed but I’m only going to focus on one of the big ones here.

One of the basic IDE features is the ability to view the source of your dependencies. By that I mean I the ⌘⇧T Eclipse shortcut that allows you to view the source of a java file of a dependency jar. When writing java in a text editor without code completion this felt required.

Since it’s debut I’ve been intrigued by MacFUSE (and of course FUSE itself). The basic idea is that you can make a file system out of anything without hacking the kernel. I was hoping to see a shift back to the file system enabling users of any editor or command line util to have some of the benefits provided by IDEs. Unfortunately I’ve yet to see this happen in the java world (please let me know if you have examples). A file system seemed like a good solution to my problem plus it gave me a real world reason to play with something new.

As a result I created a file system. The odd thing is that there’s nothing to open source. One of the complexities of java development is some companies have developed their own package management system over the years for one reason or another. At work we have a system that caches packages and source locally. Because I have access to the source I wrote a file system that was essentially a symlink farm to the already expanded source. At this point there’s nothing to abstract and release publicly. If I see the need and find the will I might attempt it. Regardless, as a result I have the ability to grep the source of my dependencies and to browse them in anything that understands a file system.

My file system looks something like the following:

MyProject
|
\-> dependencies
    |
    \->MySourceCarryingDependency
       |
       \-> src
           |
           \-> com.company.package
               |
               \-> AClass.java
               \-> BClass.java

Essentially, this is similar to the tree of dependencies you’ll see in Eclipse for a java project.

The steps I took to create this:

  1. Install MacFUSE.
  2. Install the fusefs ruby extension. (Required only to develop/run a ruby FUSE file system.)
  3. Created an ant task that wrote my project’s classpath to a file. This just generates a file name “.run.classpath” in the project directory.
  4. Wrote a FUSE file system that on startup reads this file, finds the dependencies, and generates the file system.

File system creation via fusefs is simple. If you look at the demo in fusefs you’ll get the idea. You need to implement the following callbacks:

  • contents - array of directory and file names for a path
  • file? - boolean that states if the path is a file
  • directory? - boolean that states if the path is a directory
  • read_file - contents of a file

What’s my point of talking about this without releasing source? Basically, for those of us who prefer text editor s and the file system you don’t have to give up your editor for an IDE, at least for this. Don’t get me wrong, many developers love their IDE and I’m not knocking them (IDEs nor developers). But for those of us who prefer something else we have options and maybe they’re not out of reach.

Filed under: IDEless, java, macfuse, textmate

Desirade says...

TextMate brings Apple's approach to operating systems into the world of text editors. By bridging UNIX underpinnings and GUI, TextMate cherry-picks the best of both worlds to the benefit of expert scripters and novice users alike.

Filed under: Code, Editor, Mac OS X, TextMate

cjwoodward says...

I just spent the last couple of hours trying to figure out why my cucumber feature which uploads a file to s3 using paperclip wasn't working.

It turns out that the path is used when running a textmate command is different to path when you start a terminal session. I haven't found the reason for this but as a quick fix I added:

. /etc/profile

to the run feature and run single scenario commands in my textmate bundles. I will endevour to do some more research into this for a better solution.

Filed under: cucumber, paperclip, textmate

http://github.com/alkemist/

Filed under: grails, groovy, java, textmate

It's taken me a while to realise the full awesomeness of TextMate as a code editor...

I've used Coda for web development on my MacBook for ages - occasionally though I would hear someone raving about TextMate and take a quick look.  Unfortunalty I'd quickly get intimidated by the steep learning curve for mastering it's keyboard shortcuts and promptly delete it before the end of the trial period and go straight back to Coda.

Well last Sunday I installed TextMate again, and for some reason this time I've really stuck with it.  I've put some effort in this past few days to learn it's keyboard shortcuts and boy am I glad I have...

With a bit of effort TextMate becomes so useful it's almost Zen like.  It's such a great focused environment for working in, it just seems to help me get more done more quickly.  Training myself to use new key combinations will take a bit of doing, but I've seen enough in the past few days to know that it's going to be worth it - this time I'm sticking with it.

For others thinking about switching to TextMate the best advice I can give is to focus hard on shortcuts most related to whatever language it is you code in.  In my case it's HTML, so I thought I'd share some of the most useful shortcuts I've managed to learn this past few days:

Control + Shift + V  Opens a window and validates the document HTML with the W3C Markup Validation Service.

Control + Shift + <  Opens a pair of opening/closing HTML tags.  By default these are set to <p> but with the element value selected so that it can quickly be changed.  Hitting the Tab key jumps the cursor into the element content.

Control + Shift + W  Wraps selected text with HTML tags.  By default these are set to <p> but again the element value is highlighted so that it can quickly be changed.

Cmd + Shift + L  Selects the current line.  Very useful when used just before the Control + Shift + W shortcut!

Option + Tab  Indent selection, can be used to easily indent an entire line, paragraph or just a selected item.

Option + Shift + Tab  Un-indent selection, again can be used to un-indent a selected line, paragraph or just a single item.

I've also found this exaustive TextMate keyboard shortcut cheat sheet.  Clearly I've got quite a long way to go before I become a TextMate master, but I'm sticking with it.

Filed under: textmate, tips, webdevelopment

beingbrad says...

Filed under: code, macromates, programming, textmate

RackerHacker says...

Skype - dead simple audio and video conferencing
Adium - reliable, feature-packed, multi-service IM client
Mail - it gets the job done better than anything else I've used on a Mac
Terminal - I generally have about eight of these open at a time
Propane - extremely handy way to use 37Signals' Campfire chat application
Safari - helps me browse the interwebs
iTunes - I listen to internet radio stations and manage my iPhone
EventBox - great social media app for Twitter, Facebook, Reddit, and Flickr
Transmit - no-frills file transfer client
TextMate - text editor, best application I've ever purchased
 
All of the applications are free except for Propane ($20), EventBox ($15), Transmit ($29.95) and TextMate (€39).

I just realized that I forgot to stick NetNewsWire on the list, but it's a great free RSS reader.  What you've read is synchronized with NewsGator's site so you won't have to read the same article twice.

You may notice that QuickSilver isn't in the list. That application has saved me so much time that it deserves its own post.

Filed under: adium, apps, eventbox, mac, skype, textmate, transmit

teeparham says...

I've been experimenting with Textmate vs Netbeans as my Ruby editor on my mac. Here is the current scorecard:

Textmate wins:
* UI. The interface is cleaner and I like the way the file tabs stack up on top.
* Opening files from the finder or another program is easier (I had problems getting Versions to open files in Netbeans).
* Extensibility. There are lots of bundles you can download and write to do just about anything.
* Inline ruby evaluation.

Netbeans wins:
* Price: It's free
* Searching in files: super-easy, nice UI, & you can select a folder for sub-searches. Textmate's tiny box for entering a regular expression to constrain folders and files for searching is ridiculous. Also Textmate search is quite slow.
* Formatting html files: easy and looks good. Right-click & format (or ctrl-shift-F). I find html tidy in Textmate worthless.
* Usability. It's not extensible like Textmate, but I haven't invested time to find and figure out good Textmate extensions since I'd rather get something done (update: Textmate's Rails bundle has all kinds of snippets built in).
* Sometimes the code completion and navigation works. I know Ruby makes this hard but someone's got to figure this out at some point.
* Automatically creates a matching end for you when you create a def. I'm sure textmate could do this if I installed some bundle that I have not heard of.

At this point I like Netbeans better, which is surprising, since I want to like Textmate and I paid for it. Show me the light, Textmate folks, I want to believe.

Versions: Textmate 1.5.8, Netbeans 6.5

Filed under: netbeans, ruby, textmate

Chris says...

I too read Al3x's interview the other day, and like John Nunemaker, figured I'd share my setup, as I enjoy reading what others use and often can pick up a few interesting tools or tidbits.

Unlike Mr. Nunemaker, my desk is too messy, IMHO, to photograph right now :) However, many similarities aside from that. On with it...

I use a 17" MacBook Pro with 4GB RAM as my only machine these days. Like Alex and John, I really like having just a single machine, and I no longer work for a corporation where I'd worry about that. DealBase is cool and wouldn't try to make some wacko claim to some work not relevant (and we've explicitly discussed my use of a single machine, etc.). I have my MBP open on a laptop arm from Ergotron, and then my primary monitor is a 30" Dell. Really love the big monitor. I do my main work o the 30", and then the laptop screen has TweetDeck, iChat, Things, some Fluid apps, and other things that I tend to more glance at, and aren't primary work items.

Further, I use a wireless Apple keyboard, and like John, I just love this thing. I can't tell you how long I'd been looking for a keyboard that was just a keyboard (but with arrow keys). I hate normal keyboards that take up so much extra space on the right side (my mouse side) with stuff I rarely use - which only exacerbates problems with having my arm/elbow canitlevered further out to use the mouse, sometimes causing arm strain after long days of coding. I use Logitech MX Revolution cordless mouse, which I like quite a lot.

Transitioning to music... I use JBL Creature speakers, and listen to a variety of things, or nothing. Pandora, via a Fluid app, iTunes (my own playlists, or various Ambient "radio" stations), etc. Either that, or we have a whole-house NuVo Concerto audio system, so sometimes I have that on either with XM satellite radio, or to a playlist from the iPod we have hooked into it. The NuVo setup is nice because it fills my office with sound a bit better (via in-ceiling speakers), but I have more variety via the computer.

As with Alex and John, I am absolutely in love with my iPhone 3G. It is even better than expected. It has essentially replaced my 80GB iPod in the car, typically because it's more up to date, and I like it's UI better; I can remotely work on servers if I have to via iSSH, play games if I'm bored, use InstaPaper to read things I've set for reading later, sync with Address Book and iCal, and of course Twitter, via Tweetie. So, yes, I use Apple's Address Book and iCal, for great sync, simplicity, etc.

Ok, onto dev stuff. My primary work is on Rails-based web-apps, although I dabble with other things as well. DealBase is my day job, and I'm also involved with Bring Light.

Yet again, like Alex and John, I spend the bulk of my time in TextMate, iTerm (a better Terminal, IMHO), and Safari. And actually, I do my development testing in nightly builds of WebKit/Safari, and all my other browsing in standard Safari. I do pull up Firefox for testing, and to use YSlow and sometimes Firebug (although I've been finding the dev tools in WebKit nightlies work well). I've used Emacs - did so for about a year when working with Linux as my desktop. I ditched it back then in favor of Visual SlickEdit, but these days TextMate just rules. I don't get the Emacs passion - why do you want to press two keys for everything, especially the most common things? Yes, I know, you can setup different bindings, etc., but come on the most basic things like saving, opening, copy, paste, etc. should be "single" key (and by single I mean some meta+key) strokes by default. I do fire up vi all the time at the command line on remote servers, and even occasionally on my MBP for some real quick edit. Also, I spend the bulk of my day in my text editor, so yes, appearance matters, and TextMate kills others. I've also used a lot of IDE's in the past, from IDEA, to Eclipse, to Visual Studio. Visual Studio is actually quite good if you have to suffer in that world, but I find Eclipse just plain crappy. IDEA was great for Java, and their Ruby setup will be something to keep an eye on, but generally, the setup I have now works well.

I have all my code for nearly everything I do (e.g. both private and open source/public) on GitHub, and truly love it. Git has been a huge win, and gives me the best of, as well as improving SVN and Perforce. I'm using GitX for most of my commits and history browsing these days.

I use RSpactor for continuously running our RSpec suite, and we also use RSpec stories (but haven't converted to Cucumber yet). I recently added speech output to RSpactor, and that is my preferred notification instead of Growl. We use Pivotal Tracker for tasks/stories/features as well as bug tracking. We used to use Lighthouse, but having it all in one place was nicer, and Tracker wins big time in my opinion. If you want GitHub post-receive hook for Tracker, I recently whipped that up, and its been a real nice addition. We too use Hoptoad for exception notification, and really like it. Also, New Relic is in use at DealBase. I also like viewing Google Analytics with Analytics Reporting Suite, a slick AIR app.

I really like Navicat as a GUI for database stuff. It's proprietary/pay software, but honestly, it's worth it to me. I can do all this stuff command line fine, but the GUI simply makes it a heck of a lot faster to view the results, quickly re-sort on a column, mess around with queries, etc. Also, it has great SSH support, so I can tunnel into all my server's DB's with ease.

I have CruiseControl.rb setups for all my Rails apps, and make use of CCMenu for a nice little status menu item showing me what's going on with those.

I pretty much can't live without LaunchBar. Same goes for 1Password.

Skitch is quite handy for showing sharing and annotating screen shots, and we use Google Docs and Gmail. Speaking of email, I am a huge fan of Mailplane, which is a Mac app for Gmail. Integration is superb, and I can quickly switch around my 15 or so Gmail accounts with ease. I find it superior to a Fluid app for Gmail, since the integration is better and it handles multiple accounts.

I host most of my own web apps on Slicehost, and DealBase is at EngineYard.

I also use Backpack some, although not nearly as much as I used to, and access it about 99% of the time via Packrat. MarsEdit is my blog authoring tool of choice. NetNewsWire is my RSS reader.

All of my photography and photo processing, etc. are done in Adobe Lightroom. I use the Flickr plugin for it as well.

Various other bits: