Tech Reflect
  • Home
  • About This Site
  • Contact Me
  • Search Icon

Tech Reflect

Reflecting on 25 years in tech

Quick open files of a certain type

Quick open files of a certain type

2018-03-21

I’m not spending £19 an Alfred for just this one purpose, but for its seemingly endless uses that improve productivity. In this example, I’ll create a shortcut to open Xcode projects and workspaces.

Requirements

  • A utility application called Alfred
  • Purchasing the Powerpack for £19

Setup

  • Open Alfred Preferences
  • Click on Workflows
  • Click on the button at the bottom of the sidebar
  • Choose Templates > Files and Apps > File filter from keyword and open
  • Give it a name like “Open Xcode Project” and click OK
  • Double-click on File Filter
  • Enter “x” in the keyword field and uncheck “with space” (unchecked, this means the space is optional)
  • In the File Types field, click the button and navigate to an xcodeproj file
  • Optionally, do the same with an xcworkspace file

Optionally, you can click on the Search Scope tab and restrict the search to one or more directories.

Now, bring up Alfred
Type “xfoo” or “x foo” where “foo” is the name of a project and note it’s the first result to display. Just type “x<space>” and a space and see a list of Xcode projects

Since each search type is constrained to a file type and hierarchy, it’s extremely fast and every result is the type of item you want.

Extra credit

If you also use workspaces, you can set up a separate workflow triggered off another key like “w” with a different file type and location. Note that this can be applied to any file type and any location, making it superior to Spotlight for targeted searches.

Related posts:

Custom names for screenshots
Sharing scripts between machines
macOS tips: Old Dock tips that are still useful
Backing up iCloud Drive
Click in Terminal window to move cursor
The Help menu in complex applications

macOS tips

Post navigation

NEXT
Create a test file of a certain size
PREVIOUS
Simple repeating command-line command

Follow Me

Get Monthly Updates

About Me

25 years in tech. I like to write manifestos. I like to offer interesting tips. I like making fun of things. Everyone copes differently.

Contact Me

My Other Blogs

  • Free Range Parrots
  • Plucky Tree (personal)
  • Little Dinosaur
  • Contact Me

Recent Posts

  • Getting paid to watch porn
  • Is App Library for me?
  • Tim Cook and the SF Gay Pride Parade
  • The first day we printed something in Mac OS X
  • Except for getting punched by Steve Jobs…

Categories

  • analog (1)
  • apple career (11)
  • apple inside (8)
  • apple stories (18)
  • bertrand serlet (3)
  • essays (15)
  • geeky (21)
  • iOS tips (3)
  • macOS tips (37)
  • personal (7)
  • products (3)
  • prototypes (2)
  • scott forstall (6)
  • scripting (1)
  • steve jobs (11)
  • tim cook (1)
  • workplace (14)

Archives

  • January 2021
  • December 2020
  • October 2020
  • August 2020
  • July 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017

Most Liked Content

  • Why I left Apple (2019)
  • Aperture: Senior QA (2004-2005)
  • The last time I saw Steve Jobs
  • Desktop Pictures taken by Steve Jobs
  • How I ended up at Apple (1999)

Get Monthly Updates

About Me

25 years in tech. I like to write manifestos. I like to offer interesting tips. I like making fun of things. Everyone copes differently.

Contact Me

My Other Blogs

  • Free Range Parrots
  • Plucky Tree (personal)
  • Little Dinosaur
  • Contact Me
© 2021   All Rights Reserved.