Archive for the ‘text editor’ Category

TextMate tips

Monday, March 5th, 2007

I use TextMate for most of my working day. The TextMate Basics Tutorial is a good place to start to increase your proficiency with it. Here are a few of the more useful keyboard-shortcuts:

  • Another rather hidden feature is the incremental search. ⌃S or ⌃⇧S incrementally searches forward/backward as you type (the status bar will turn into an input field in that case).
  • ⌃G (Text → Convert → To Opposite Case) with no selection will toggle the case of the character next to the caret and advance the caret. with a selection it will toggle the case of all the characters in the selection (and leave the selection in place).
  • Subversion Support is provided via this Bundle. Just checkout a directory or file from a Subversion repository, open it in TextMate and you can use this Bundle. All Subversion Commands use the same shortcut ⌃⇧A
  • Bookmarks are marked places in your document. ⌥⌘B (View → Gutter → Bookmarks) will show them in the gutter (the gray panel to the left of the editable area, containing line numbers etc.) You can create a bookmark with ⌘F2 (Navigation → Add Bookmark). This will put a star (★) in the bookmark column of the gutter for that line. You can then always cycle through your bookmarks with F2 (Navigation → Next Bookmark) and ⇧F2 (Navigation → Previous Bookmark).
  • So, F1 View → Fold Current Block

There are many more but it is best to add a few every week to your knowledge so they become automatic.

TextMate tip

Tuesday, January 16th, 2007

I normally launch TextMate through a terminal window with “mate *” in the project directory. That brings up TextMate with the folder list showing all folders and files in the project directory. It works nicely but often there are directories in your project that you don’t need to edit but which are cluttering the view.

So just the other day I learnt that instead of “mate *” you can type “mate dir1 dir2 dir5″ and TextMate will load with just those folders shown. e.g. in a Ruby on Rails app you generally only need to edit the app, config and public folders, ignoring the log, vendor, test etc. folders until you need them later. So you can type “mate app public” for a Rails project.

Very uncluttered and useful. Good one TextMate!

TextMate is that good

Thursday, September 28th, 2006

This might seem a bit “me too” but it would seem all the Ruby on Rails developers on Mac who use TextMate actually have a clue. This is a really good text editor. Good enough that I just paid €39 for it. The “project” fly-out is simple and brilliant, no meta project files or strange directory structure requirements; it just shows everything under the directory you specify. The bundles work well too providing shortcuts and intelligent text handling for a variety of tasks e.g. HTML, CSS and Ruby on Rails.

All in all a great tool, go give it a try.

I really am a card carrying Rails on Mac user now.