However, it’s hard to go wrong with erring on the side of readability.Ī potential solution is to first create a Snippet with a verbose abbreviation. Of course, you want to avoid Snippet abbreviations that are longer than what they expand into, so you need to find a balance between Snippet length and readability. In the screenshot above, we use Snippet names like “em.expensesubject” and “em.expensebody” so that when you see those Snippet abbreviations embedded in another Snippet, you can easily understand what that Snippet does. That’s much more readable than something like “ sig” or “xsig” but is still fewer characters to type than the entire signature.Īnother advantage is when you nest Snippets. So if your Snippet label is “Email Signature,” the Snippet abbreviation could be “em.sig”. In our last installment, we discussed ways to make your Snippet abbreviations human-readable with Group prefixes. Make human-readable Snippet abbreviations There are several ways to document TextExpander Snippets. If you follow our best practices, you’ll have clear, descriptive Snippet labels and abbreviations that are explanatory and make them discoverable. That includes both comments in the code and well-named variables that clearly describe what they do. Best practices for documenting SnippetsĪsk any programmer about the key to good code, and they’ll say: documentation. Taking a little time to “ eat your own dogfood” can save you from frustration and embarrassment if a shared Snippet doesn’t work as intended.
0 Comments
Leave a Reply. |