Book Image

TextMate How-To

By : Christopher J Mears
Book Image

TextMate How-To

By: Christopher J Mears

Overview of this book

Not all text editors are created equal. TextMate was created with versatility and power to the developer. Whether you want to organize your files in projects, utilize the efficiency of code completion, take advantage of the thousands of publicly available bundles, or gain insight using powerful regular expression searching, TextMate is an essential and easy-to-use tool you need in your development arsenal. "TextMate How-To" is a practical guide filled with conventional recipes on using one of the most popular text editors on the OS X platform. It is a great resource for anyone who wants to learn how to code more efficiently and effectively, no matter what programming or scripting language you use. This book will guide the reader through using TextMate for practical purposes. It will start with configuring the application, then cover navigation and editing of files, and finish with bundles and advanced features. Throughout the book, the reader will quickly master the key features of the application through easy to follow tasks. Using this book, the reader will learn the most common text editing and coding tasks including navigation through the document and searching of text. The reader will then learn about working with and navigating between files and projects as well as utilizing bundles to greatly speed up development. Finally, explore the ability to use shell commands and macros to increase productivity. With just a few hours, "TextMate How-To" will teach the reader everything necessary to hit the ground running with this powerful text editor.
Table of Contents (7 chapters)

Markdown and Textile (Should know)


Markdown and Textile are plain text file formats that can easily be converted to HTML (and other formats) through the use of easily accessible libraries. This task will cover both formats and explain why you may want to use one over the other depending on your project.

Getting ready

Install the Markdown and Textile Bundles via GetBundles.

How to do it...

It's as simple as selecting the file format from the document status menu. The following screenshot is an example of using the Markdown bundle:

The following screenshot is an example of using the Textile bundle:

How it works...

Though both the Markdown and Textile bundles make it easier to utilize these lightweight markup languages, the real power lies within the syntax. Both bundles provide easy access to the documentation with the keyboard shortcut Control + H. The following screenshot is an example of the Markdown documentation:

The following screenshot is an example of the Textile documentation:

With Markdown, if you are currently making edits, you may instead see a tooltip with helpful instructions to speed up your editing. This is shown in the following screenshot:

You can find out more about these formats and their syntaxes at the following sites:

For Markdown use http://daringfireball.net/projects/markdown/, and for Textile use http://redcloth.org/hobix.com/textile/.

There's more…

You may be asking yourself, "Should I use Textile or Markdown?" The answer to this question largely depends on the project at hand.

Which should I use?

Developed by John Gruber and Aaron Swartz, Markdown was meant to allow a format that is easy to write, read, and convertible into a structured format such as HTML.

Textile is similar in nature but focuses more on marking up the language. Originally developed by Dean Allen, it is regarded as a "humane web text generator".

History aside, it really comes down to your particular needs. I typically use Textile when I want greater control over the markup's end result. Textile is also used for a lot of wikis and blogs. I use Markdown whenever I want to format plain text in a pretty way and want the document to be easily convertible into HTML (for example, my resume or notes). They can both do about the same amount things, so it's purely up to you.