{"data":{"markdownRemark":{"id":"3d97caf7-23da-5d72-ac6b-9fa8601a0f8f","html":"<h2 id=\"what-is-textexpander\"><a href=\"#what-is-textexpander\" aria-label=\"what is textexpander permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is TextExpander</h2>\n<p><a href=\"https://textexpander.com/\">TextExpander</a> is a handy tool that lets you insert “snippets” using keyboard shortcuts or abbreviations. They market it to enterprise customers who want their support team to have consistent, accurate boilerplates for responses and statements, but there’s plenty of functionality for normal people like me. I currently have the $3.33/month plan for one user.</p>\n<p><img src=\"/media/textexpander_personal.gif\" alt=\"text-expander-demo\" title=\"TextExpander Demo\"></p>\n<p>Basically you can set <em>snippets</em>, which will replace the abbreviation that you create for it. For example, when I type <code class=\"language-text\">;em</code> (short for email), right the abbreviation gets <em>expanded</em> to my email, <code class=\"language-text\">hunter@hunterwatson.ca</code>. You can categorize your shortcuts with groups, which can be activated/deactivate within certain apps. Each group also lets you choose a <em>delimiter</em> (mine is <code class=\"language-text\">;</code>) which will prefix your abbreviation (since making just <code class=\"language-text\">em</code> expand into my email would be amess).</p>\n<p>Here’s what the UI looks like when making these shortcuts (I have the darkmode enabled because it makes me feel like a programmer):</p>\n<p><img src=\"/media/textexpander_menu.png\" alt=\"text-expander-interface\" title=\"TextExpander Menu\"></p>\n<p>The left bar houses all of the groups, and each group can be expanded to see the snippets within them. The <code class=\"language-text\">Content</code> can be changed to Plain Text, Picture, JavaScript, and some others. The big white text box is your outputted message, or snippet; you can add values like dates, fill-ins, and cursor movements with the dropdowns at the top of the section. <code class=\"language-text\">Abbreviation</code> is the input, so when you type this prefixed by the delimiter it will turn into the snippet. The delimiter is set in the group, so you shouldn’t add it to the abbreviation.</p>\n<p>You can hide the application from your doc and just have it show in the top menu bar which is nice. Another cool feature is receiving a notification whenever you type out a snippet instead of using the abbreviation. It’s a nice reminder that I can save time by using the app.</p>\n<h2 id=\"texexpander-uses\"><a href=\"#texexpander-uses\" aria-label=\"texexpander uses permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>TexExpander Uses</h2>\n<p>The most obvious use is creating shortcuts for frequently used terms. I have my phone number (<code class=\"language-text\">;phone</code>), address (<code class=\"language-text\">;home</code>), email (<code class=\"language-text\">;em</code>), and various other personal bits of information set up with abbreviations.</p>\n<h3 id=\"emojis\"><a href=\"#emojis\" aria-label=\"emojis permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Emojis</h3>\n<p>I’ve also set up a Slack-like emoji system I can use in other applications. Surrounding an emoji term with colons will create that emoji. For example, <code class=\"language-text\">:eyes:</code> -> 👀, <code class=\"language-text\">:triumph:</code> -> 😤, and <code class=\"language-text\">:joy:</code> -> 😂. I only added my frequently used emojis, but you can subscribe to a free, premade list with all the emojis if you don’t want to go through the work of picking and choosing.</p>\n<h3 id=\"clipboard-macros\"><a href=\"#clipboard-macros\" aria-label=\"clipboard macros permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Clipboard Macros</h3>\n<p>There’s some cool functionality you can do with the <code class=\"language-text\">clipboard</code> feature, which let’s you use whatever you have copied. The TextExpander website suggests using it for various business-y things (When writing an email, if you don’t want to misspell the first name of the person your emailing, copy/paste their first name!), but that’s not very useful for someone who rarely communicates to people. I found some cool uses with the JavaScrirpt functionality.</p>\n<p><img src=\"/media/textexpander_fun.gif\" alt=\"text-expander-clipboard\" title=\"TextExpander Clipboard\"></p>\n<p>Both of these are just for fun and the memes associated with them are super outdated, but I use them nonetheless. The <a href=\"https://knowyourmeme.com/memes/clap-emoji-%F0%9F%91%8F\"><em>ratchet clap</em></a> macro is great for sarcastically emphasizing a point, and the <a href=\"https://knowyourmeme.com/memes/mocking-spongebob\"><em>mocking SpongeBob</em></a> macro is used for… well… mocking.</p>\n<p>The code for <code class=\"language-text\">;clap</code> (<em>Content: JavaScript</em>):</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">var</span> str <span class=\"token operator\">=</span> <span class=\"token punctuation\">(</span>TextExpander<span class=\"token punctuation\">.</span>pasteboardText<span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span><span class=\"token function\">split</span><span class=\"token punctuation\">(</span><span class=\"token string\">\" \"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">var</span> result <span class=\"token operator\">=</span> <span class=\"token string\">\"\"</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token keyword\">for</span><span class=\"token punctuation\">(</span> i <span class=\"token operator\">=</span> <span class=\"token number\">0</span><span class=\"token punctuation\">;</span> i <span class=\"token operator\">&lt;</span> str<span class=\"token punctuation\">.</span>length <span class=\"token operator\">-</span> <span class=\"token number\">1</span><span class=\"token punctuation\">;</span> i<span class=\"token operator\">++</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    result <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span> <span class=\"token operator\">+</span> <span class=\"token string\">\" \"</span> <span class=\"token operator\">+</span> String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCodePoint</span><span class=\"token punctuation\">(</span><span class=\"token number\">0x1F44F</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">+</span> <span class=\"token string\">\" \"</span><span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span>\n\nresult <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>str<span class=\"token punctuation\">.</span>length<span class=\"token operator\">-</span><span class=\"token number\">1</span><span class=\"token punctuation\">]</span></code></pre></div>\n<p>The code for <code class=\"language-text\">;mock</code> (<em>Content: JavaScript</em>):</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">var</span> str <span class=\"token operator\">=</span> <span class=\"token punctuation\">(</span>TextExpander<span class=\"token punctuation\">.</span>pasteboardText<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">var</span> result <span class=\"token operator\">=</span> <span class=\"token string\">\"\"</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">var</span> counter <span class=\"token operator\">=</span> <span class=\"token number\">0</span>\n\n<span class=\"token keyword\">for</span><span class=\"token punctuation\">(</span> i <span class=\"token operator\">=</span> <span class=\"token number\">0</span><span class=\"token punctuation\">;</span> i <span class=\"token operator\">&lt;</span> str<span class=\"token punctuation\">.</span>length <span class=\"token operator\">-</span> <span class=\"token number\">1</span><span class=\"token punctuation\">;</span> i<span class=\"token operator\">++</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">if</span> <span class=\"token punctuation\">(</span>str<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span> <span class=\"token operator\">==</span> <span class=\"token string\">\" \"</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n        result <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span>\n    <span class=\"token punctuation\">}</span> <span class=\"token keyword\">else</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token keyword\">if</span> <span class=\"token punctuation\">(</span>counter <span class=\"token operator\">%</span> <span class=\"token number\">2</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n            result <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span><span class=\"token function\">toUpperCase</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n        <span class=\"token punctuation\">}</span> <span class=\"token keyword\">else</span> <span class=\"token punctuation\">{</span>\n            result <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span><span class=\"token function\">toLowerCase</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n        <span class=\"token punctuation\">}</span>\n        counter<span class=\"token operator\">++</span>\n    <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span>\nresult <span class=\"token operator\">+=</span> str<span class=\"token punctuation\">[</span>str<span class=\"token punctuation\">.</span>length<span class=\"token operator\">-</span><span class=\"token number\">1</span><span class=\"token punctuation\">]</span></code></pre></div>\n<h3 id=\"json\"><a href=\"#json\" aria-label=\"json permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JSON</h3>\n<p>The clipboard functionality can also be used for pretty-printing JSON.</p>\n<p><img src=\"/media/textexpander_json.gif\" alt=\"text-expander-json\" title=\"TextExpander JSON\"></p>\n<p>The code for <code class=\"language-text\">;json</code> (<em>Content: JavaScript</em>):</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span><span class=\"token operator\">%</span>clipboard<span class=\"token punctuation\">,</span> <span class=\"token keyword\">null</span><span class=\"token punctuation\">,</span> <span class=\"token number\">2</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<hr>\n<p>I’m still pretty new to TextExpander, but I’m pretty happy with it so far. I’m planning on adding some trash-talking macros so I can flame people in League of Legends without actually typing the whole thing out.</p>","fields":{"slug":"/posts/having-fun-with-textexpander","tagSlugs":["/tag/textexpander/","/tag/productivity/"]},"frontmatter":{"date":"2019-05-17T03:40:00.000Z","description":"TextExpander is a handy tool that lets you insert \"snippets\" using keyboard shortcuts or abbreviations. This post explores some of my most used shortcuts as well as some fun stuff you can do with it.","tags":["textexpander","productivity"],"title":"having fun with TextExpander"}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"/posts/having-fun-with-textexpander"}}