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)

Blogging more efficiently (Should know)


With the popularity of WordPress and other Content Management Systems (CMS) that incorporate What You See Is What You Get (WYSIWYG) editors, such as TinyMCE and auto-saving, writing in separate editors seems a bit unnecessary or "old school". However, I still often prefer to work remotely, which sometimes means no Internet and makes TextMate a perfect offline utility. This task will cover a few of the more useful blogging bundles: Blogging and Hyperlink Helper.

Getting ready

Install the Blogging and Hyperlink Helper bundles via GetBundles.

How to do it...

The Hyperlink Helper option:

  • The Wrap selection with link option: Wrap a hyperlink tag no matter what kind of document you're in (HTML, Markdown, Textile, and so on) by using Control + Shift + L or from the menu by selecting Bundles | Hyperlink Helper | Wrap selection as link.

  • Search for selection and wrap with link: Use the keyboard shortcut Command + Control + Shift + L (or select Bundles | Hyperlink Helper | Lookup word on Google and link) to search for the selected text and wrap that text with the first result from Google.

The Blogging option:

  1. The Setup option: First you must define your list of blogs by entering the blog name and XML-RPC (that is, Remote Procedure Call using XML) URL. From the menu select Bundles | Blogging | Setup. This is shown in the following screenshot:

  2. Fetching blogs: In order to start editing blog posts, you'll need to fetch a list of the blog entries. From the menu select Bundles | Blogging | Fetch Post. The Fetch Post window is shown in the next screenshot.

  3. The most common XML-RPC locations are as follows:

  4. Edit and save the blog: Edit the blog entry in Markdown (see the Markdown and Textile section later in this chapter) and save blog as you normally would (Command + S). Once you're done editing, post to the blog with the keyboard shortcut Command + Control + P (or select Bundles | Blogging | Post to Blog).

How it works...

The Hyperlink Helper option is quite useful when you want to quickly insert references into your documents without having to go back and forth between your browser, search for the address, and then paste it into your document.

It also has some further functionality, such as searching for word definition links in Wikipedia and more advanced Yahoo! search engine searches.

The Help documentation for the Blogging bundle is quite helpful, so you should read it if you have any issues. From the menu select Bundles | Blogging | Help.