---
title: "#275: Adding Imports from Anywhere ☝️⌨️"
url: https://littlebitesofcocoa.com/275-adding-imports-from-anywhere
author: Jake Marsh
published: 2016-10-07
topics: ["Libraries","Tools"]
description: "Xcode Source Editor Extensions are really starting to come into their own. Today we'll look at one that solves an age-old annoyance for Xcode users: Importing."
---

# #275: Adding Imports from Anywhere ☝️⌨️

By Jake Marsh, October 7, 2016. HTML: https://littlebitesofcocoa.com/275-adding-imports-from-anywhere

_Xcode Source Editor Extensions_ are really starting to come into their own. Today we'll look at one that solves an age-old annoyance for **Xcode** users: _Importing_.

We've all been there. We're deep down in the depths of file, and we realize we need to `import` a **module**. We dutifully scroll all the way up, type the import, then scroll back down trying to find our place, and get back in "the zone". Yuck.

Let's try out a new _Source Editor Extension_ ([Bite #239](https://littlebitesofcocoa.com/239)) from [Marko Hlebar](https://github.com/markohlebar) called [Import](https://github.com/markohlebar/Import).

As the name suggests, it allows us to type an `import Module` statement anywhere, then press a keyboard shortcut and have the import fly to the top where it belongs.

Let's try it out.

After [installing the extension](https://github.com/markohlebar/Import#installation-guide-xcode-8--osx-1011), we'll `import CoreGraphics`.

**Xcode's Autocomplete** still works here to help us find the **module** we want to import. Neat!

By default the keyboard shortcut is **Command** + **Control** + **P**. This trigger is also available  via the menu item: **Editor** > **Import** > ☝️.

<p class='break'></p>

<img src="https://media.littlebitesofcocoa.com/275-1.gif" style="max-width: 400px;"  />

Success! Now we don't have to lose our place, or our train of thought when we need to `import` something.

Learn more about [Import](https://github.com/markohlebar/Import) (including full installation instructions) at [git.io/import](http://git.io/import)

<p></p>
