Installed via Preferences > Bundles
Bundles are typically associated with particular file types, and will automatically load when a file of that type is opened.
You can trigger bundle items via the Select bundle item
widget using ctrl-cmd-T
, then entering text to find what you're looking for.
Bundle items are also available via the "gear" icon on the status bar.
You can customize and installed bundle via the Bundle Editor: Bundles > Edit Bundles ...
ctrl-H
will pull up relevant documentation in most bundles.
There are a variety of bundles maintained on GitHub.
Select rows with mouse, click option
Alternately, hold downoption
while interactively making a selection.
Edit multiple arbitrary locations simultaneously
To edit all occurrences of a particular string:
cmd-E
to use selection for findoption-cmd-F
to find allQuickly search current document for a string with control-s
.
ctrl-W
selects the current word (hitting it again adds the next occurrence to the selection)shift-cmd-L
selects an entire linectrl-shift-K
deletes an entire linectrl-K
deletes to the end of a linectrl-shift-J
merges the current line with the previous onectrl-cmd-{arrow}
moves a particular line in given directioncmd-leftarrow
(cmd-rightarrow
) moves to the beginning (end) of the linecmd-uparrow
(cmd-downarrow
) moves to the top (bottom) of the documentopt-leftarrow
(opt-rightarrow
) moves to the left (right) one word at a timeopt-cmd-[
automagically cleans up indentationcmd-/
comments out the current line according to appropriate languagectrl-shift-underscore
toggles between CamelCase, underscores and nerdCaseTextMate also recognizes Emacs shortcuts.
You can access the recent history of your clipboard using ctrl-opt-cmd-V
.
Opening TextMate via mate
command.
File diffs can be piped to TextMate, and displayed with highlighting.
diff file1.py file2.py | mate
Can set up rmate
to edit remote files.
When working with multiple files (project) its useful to display the file browser pane (ctrl-opt-cmd-D
).
ESC
is your friend. Hitting it repeatedly will cycle through completion alternatives based on current document
ctags
(beyond scope of this tutorial)Most bundles include context-specific "snippets" of commonly-used language constructs. They are triggered with a keyword followed by tab
.
TextMate's find interface can search across and entire project, and optionally use regular expressions.
The preview pane shows what your replacement would look like before committing to the changes.
Search can be performed in one of several scopes:
Pressing cmd-T
opens the "Go to file" dialog that allows you to find particular files within the current file (folder). Typing a few characters does a live search of that substring.
You can open recent projects or your favorites with shift-cmd-O
The Git bundle provides access to most routine Git commands. cmd-Y
opens a contextual menu; can search for commands with the Select bundle item ...
pane (ctrl-cmd-T
).
The Gist command is useful for sharing code and snippets via your GitHub accounts. Gists can be updated with a single command.
The LaTeX bundle in TextMate includes several actions and snippets to help you automate your workflow.
TextMate interacts with your specified LaTeX viewer.
For many language bundles, ctrl-H
will display help for the current command in your code, provided that it is available...`
Dragging images into an html or markdown document.
Several preferences can be stored in your .tm_properties
file
# Universal settings
fontName = "Source Code Pro"
fontSize = 16
lineHighlight = '#FFFBD1';
softWrap = true
wrapColumn = "Use Window Frame"
tabSize = 4
softTabs = true
excludeFiles = "*.{so,pyc,o}"
excludeDirectories = "{build,dist,*.egg-info}"
includeFiles = ".gitignore"
spellChecking = true
TM_GIT = "/usr/local/bin/git"
PATH = "$PATH:/usr/texbin"
# Add Git info in window title
windowTitleSCM = '${TM_SCM_BRANCH:+ ($TM_SCM_NAME: $TM_SCM_BRANCH)}'
windowTitle = '$TM_DISPLAYNAME$windowTitleSCM'
# File-specific configurations
[ source.python ]
TM_PYCHECKER = pep8
spellChecking = false
TM_PYCHECKER = /usr/local/bin/pep8
[ .git/COMMIT_EDITMSG ]
spellChecking = true
spellingLanguage = 'en'
[ *.{icns,ico,jpg,jpeg,m4v,nib,pdf,png,psd,pyc,rtf,tif,tiff,xib} ]
binary = true
[ "{README,INSTALL,LICENSE,TODO}" ]
fileType = "text.plain"