Brett's TextExpander Snippets
Just collecting a few of my favorite TextExpander snippets here, feel free to use. I have these set to expand after a Tab, but they should work with just about any expansion settings. Related commands all have similar beginnings to make using the "Suggest Completions" feature easier.
This repo now includes the base system I'm using to generate downloads with custom snippets. The files to be customized are named with the extension ".tedist" and the prefixes in the "abbreviation" string of the plist are replaced with "[[PREFIX]]". The rest is handled by the php files.
getsnippets.php
is called through ajax and serves as an example for reading the snippets and shortcuts from the plist. Returns json output for the file specified in the query string with "file=groupname" (no extension).
Snippets
Tools.textexpander
-
Hyphenate clipboard
Hyphenates the contents of the clipboard, ignoring spaces after punctuation or leading/trailing spaces. Should probably just be a Service, but this is actually faster, most of the time.
-
Encode email address
Takes an email address in the clipboard and prints an ASCII-encoded (non-human-readable) version with mailto: prefix.
-
Clipboard HTML link
Makes an html hyperlink (code, not rich text) from a url in the clipboard. Uses the Fill feature to request the link text.
-
Markdown Link
Makes a Markdown format link from a url in the clipboard. Uses the Fill feature to request the link text.
-
Rounded Corners
Uses the Fill feature to request a pixel radius, and creates cross-browser CSS for rounded corners. There are 5 variations, one for each corner and one for all corners.
-
CSS Reset
Your typical CSS reset code, in Meyers and YUI flavors.
-
Shorten clipboard url
Shorten a URL in the clipboard, using bit.ly, go., is.gd or tinyurl. Slightly faster than the AppleScript versions available from TE, and they handle a wider range of possible inputs.
-
Make URL
Take whatever text is in the clipboard and provide a best-guess URL for it. Handy if you have a qualified domain and just need the protocol added, or if you have an email address and want it to be a mailto: link.
-
Hashbang
Instant hashbangs for ruby, osascript and bash.
-
Paste Markdown references
Takes a list of urls in the clipboard, in just about any format, and converts them into a list of Markdown references. Titles are generated by domains, incremented for repeats and sorted alphanumerically. Duplicate URL's are stripped from output.
Lipsums.textexpander
-
Placeholder Nav
Basic unordered list with dummy links.
-
Standard Lipsum
Three lipsumX commands for 1, 2 or 3 paragraphs of standard Lorem Ipsum.
-
HTML Lipsum
Ordered list, unordered list, and the full medley of HTML Lipsum for styling.
Random Lipsums.textexpander
- A series of snippets which use shell scripts to generate random text from various sources.
iOS Markdown.textexpander
- Snippets for fast Markdown entry using TextExpander touch