
Soft Tabs: Soft tabs versus hard tabs are somewhat controversial (do a Google search and you'll see). If you'd rather have fewer margin distractions, then you can also determine your cursor's current line and column position in the status bar at the bottom of the document window. Line Numbers: They are helpful to establish where you are in a document. With just a few hours, "TextMate How-To" will teach the reader everything necessary to hit the ground running with this powerful text editor. Finally, explore the ability to use shell commands and macros to increase productivity. The reader will then learn about working with and navigating between files and projects as well as utilizing bundles to greatly speed up development. Using this book, the reader will learn the most common text editing and coding tasks including navigation through the document and searching of text. Throughout the book, the reader will quickly master the key features of the application through easy to follow tasks. It will start with configuring the application, then cover navigation and editing of files, and finish with bundles and advanced features. This book will guide the reader through using TextMate for practical purposes. 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. "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. 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 was created with versatility and power to the developer. The former is by far the simplest, the latter is a property list with environment variables read by Finder when you login, so values set here should affect all applications.Not all text editors are created equal. Either via Preferences → Advanced → Shell Variables or by editing ~/.MacOSX/ist. There are two ways to setup PATH for TextMate. TextMate inherits the value of PATH from Finder, which has only a few search locations specified, so for many users, it is necessary to augment this PATH if they need TextMate to find git, pdflatex, or similar commands not included with Mac OS X. For example ruby is located in /usr/bin/ruby and svn is (for me) located in /opt/local/bin/svn. When running a command from Terminal, the shell will use the value of the PATH variable to locate it (when it is specified without an absolute location). You can also set that documents should be saved before executing the command and give the command a key equivalent or tab trigger. for commands which build the project and show results, incrementally). for commands which lookup help for the current word) or HTML (e.g.

you can set what to do with input/output, even have the output shown as a tool tip (e.g. The options here are the same as those of option 2, i.e. The first two options are mostly for one-shot commands, whereas commands created in the Bundle Editor are for stuff you want to run again later.


In the current document, either press ⌃R with no selection to run the current line as a shell command, or select one or more lines and use ⌃R to run the selection as a shell script (it supports shebang as well).įrom the Text menu you can select Filter Through Command… (⌥⌘R) which opens a panel where you can enter a shell command to run and set what should be given as input (stdin) plus what to do with the output of the command (often you want to set input to the selected text and let the output replace the selection).Ĭommands via the Bundle Editor. TextMate allows shell commands to be executed in different contexts. as done when launching Terminal and entering commands to execute.įor a thorough introduction to the shell scripting language have a look at this shell tutorial provided by Apple. The shell is a scripting language used to piece together various programs (shell commands), and often in an interactive way, e.g.
