tl;dw: double click around single quotes to select

QoL: Quality of Life improvements.

Sharpening the axe is useful (and rewarding) and 1% improvements compound.

I have used the iTerm terminal emulator for years, for as long as I remember using macOS. Its β€œSmart Selection” feature enables double-clicking1 on text to semantically select it (e.g., URLs, email addresses, text wrapped by double quotes, etc.).

Smart Selection is super nice, but by default does not work for text within single quotes. To fix that:

  1. Open your iTerm settings
  2. β†’ Profiles (tab)
  3. β†’ Advanced (tab)
  4. β†’ Smart Selection
  5. β†’ Click on β€œ+”
  6. Use β€œSingle quoted string” or any description you’d like, then @?'(?:[^'\\]|\\.)*' as the regular expression.

# Footnotes

  1. By default is configured to smart-select on quadruple-click, but you can change that to double click in General/Selection.Β