walls.corpus

By Nathan L. Walls

Tool Sharpening: May 25, 2014

For some background on what’s going on here, see the first tool sharpening post

This past week’s refinements started with more BBEdit adjustments. I’ve been spending a lot of time in the text editor. Thinking through it, it’s overdue. There are several actions in my daily workflow that feel inefficient to me, ones that I know an editor like Emacs or vi(m) has readily available. And, as it turns out, as I have been looking for solutions, I have been finding them.

In my previous entry, I mentioned the BBEdit 10.x release notes containing a lot of information about existing features of which I was taking insufficient advantage of. I alluded to some keyboard binding changes I made in favor of built-in shortcuts. Those are pretty great. What’s also great is that several Mac OS X applications support using a number of Emacs key bindings because there’s a whole range of default shortcuts for text manipulation that work in Mac OS X applications that make use of the Cocoa Text System. What’s very nice about that is effort I put into learning more of the these shortcuts in BBEdit are likely to pay off in other OS X applications I use.

One of these Emacs shortcuts I learned about from BBEdit’s version 10.x release notes is about C-u (Control-u if you’re not versed in how Emacs documentation refers to this). C-u takes a number and then a character to repeat that number of times.

A sample case is this: I will use a series of #‘s in a source code file as a header or section separater. I’ve tried approaches from create a clipping for that to typing four or five of them then cut-and-repetitive-pasting. This, instead, gives me something more flexible.

By example:

1
C-u 20 #

will yield:

1
####################

There are several other immediately helpful shortcuts, too, such as C-t, which will transpose two selected characters, as such: ab becomes ba. In BBEdit, if the selection range is larger than two characters, the first and last characters in the selection are transposed, so abcd becomes dbca.

Functionality for transposing words also works, but transposing lines does not. If I end up needing that, I’ll just need to use slightly longer shortcuts around line manipulation. If I need it more consistently, I can write a text filter.

Finding these shortcuts have helped to alleviate the low-grade sensation that I was working too hard to edit text. The rest of this week’s changes are below. Enjoy.

Other BBEdit changes

  • Added a shortcut for prefix/suffix line
  • Added a shortcut for reapplying the last text filter used
  • Updated a text filter I’ve been using for a long while that queries a JIRA instance and provides me with the case title and a link in a Markdown list

TextExpander changes

  • I keep a food journal in a text document, so there are a few items I type repetitively. To that end, I want less typing and correct spelling.
    • Replace “Worchester” with “Worcestershire”
    • Expand “CAJ” to “Cup-a-Joe”, a local coffeehouse
    • Expand ;cs to “chicken salad”
    • Expand ;tm to “trail mix”
  • Added a shortcut for “stand-up”
  • Reviewed how to chain shortcuts in TextExpander
  • Created a shortcut that allows me to pre-fill “.webassign.net” for SSH and moves the cursor to right before the first dot in order to

Other misc changes

  • Created a TextExpander perspective in OmniFocus in order to quickly focus on pending adjustments
  • Created new search profiles for Ruby, JavaSCript, HTML + CSS, datastores and “DevOps” tools in Dash