OSX: Shortcuts for Subnet Masks with TextExpander

I’m always looking for ways to improve my writing speed and accuracy. One way is to use specific keyboard shortcuts for tasks that are repetitive and prone to inaccuracy. So, using Cmd-C / Cmd-V for for Copy and Paste makes a whole load of good sense as it’s faster & more accurate than using the mouse to click through multiple menus, and put the cursor where it needs to be.

However, keyboard shortcuts are kind of limited. A more flexible approach is to use a program that can substitute short sets of text into much longer pieces. To do this, I use a program called TextExpander to keep a library of ‘snippets’ for expansion into a range of useful actions.

For example, I have a text snippet etmd and whenever I type these four letters, it is automatically expanded to EtherealMind.

The possibilities are endless, and I’m hoping to share a few different ideas and get feedback from you to help me build my collection of useful shortcuts.


Here I want to share my TextExpander library for handling Subnet Masks and Inverse Subnet masks for IPv4. I’ve always thought of subnet masks as binary masks, and really the use of Base10 numbers is to make it easy for people to learn. Thus I tend to think ‘/24’ not ‘’. But using /24 as a shortcut didn’t work because I use that all the time when writing documentation. So I’ve adapted to using the following example shortcuts:

Expanding Subnet Masks
Expanded Text Keyboard Shortcut ,24 ,25 ,26

To create inverse masks I’ve decided to use the ! character to denote the inverse condition ( thus loosely adopting the Unix convention where ! acts as the inverse or negative condition ).

Expanding Inverse Subnet Masks
Expanded Text Keyboard Shortcut !24 !25 !26

Importing TextExpander Snippets

All you need to do is download this zip file, extract and double click and it will install to TextExpander on your Mac.

IOS Masks 20110303.textexpander.zip

I look forward to hearing feedback on this. I have quite a few other IOS snippets but want to see if people are interested in the idea before I write it up. Let me know.

Creating your own Snippets Manually

For those people who aren’t familiar with TextExpander here are a couple of screenshots showing how I created these manually.

Caption Text.

Defining Snippet in TextExpander.(Click for a full size image)

Caption Text.

Defining Snippet in TextExpander..(Click for a full size image)


  • http://bill.crazyriver.com Bill K

    Nice little snippet idea, Love Textexpander but I really never get around to thinking about what I do so frequently that a snippet would help…

  • http://te-snippets.com Alexander Poslavsky

    Hi Greg!

    I added a link to your TextExpander library on http://te-snippets.com a new TE snippet site.

  • mrdoro

    Hello Greg!
    Super snippet idea, I started testing the Textexpander and its amazing!

  • http://www.sudonetworks.com Steve Williams

    Hi Greg,

    Nice collection, thanks for sharing!