New Editor Textmate


I am trying out a new editor called TextMate. So far I am impressed.

The real strength of TextMate is the context awareness.. I known there are many
editors that allow this but TextMate shows some features I have never seen in any other editor.

Tab Completion

Take for example the ruby mode. Create an empty file, type tc followed by tab and the following is entered:

require “test/unit”

 
require “library_file_name”

 
class TestLibraryFileName < Test::Unit::TestCase
   def test_case_name

 
   end
end

But it doesn’t end there. The cursor automatically moves to the argument of the second require allowing you to enter the name of the class you want to test. Then once you start typing the name of the class (using underscores as ruby dictates) the name of the class is changing at the same time.

require “test/unit”

 
require “my_test_class”

 
class TestMyTestClass < Test::Unit::TestCase
   def test_case_name

 
   end
end

So all I entered is “my_test_class” and the name of the class was automatically updated to reflect this. Then another two tabs and the text “_case_name” is highlighted allowing me to name the first test case.

To summarize. There is more then just inserting code snippets. It also “understands” the code snippets being inserted and with a few tabs and characters you are up and running.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.