Better Programming

Advice for programmers.

Follow publication

Member-only story

How To Edit Multiple Lines of a File in Xcode

Zack Shapiro
Better Programming
Published in
2 min readAug 28, 2019

IDEs like Sublime Text, Atom and VSCode have had the ability to edit multiple lines for years and it saves me a ton of time. Xcode, however, has been lagging in that department.

Apple rolled out a huge Xcode refactor when they came out with Xcode 9 in 2017 but multi-line edit support was missing outside of the new Edit All In Scope.

Finally in Xcode 10 we have the ability to select multiple lines to edit our code!

Shift + Control + Click

First, hold Shift and Control (^) and then click where you want to select multiple lines and then start typing. One small caveat: unlike other text editors where you can click that same line to unselect the multi-line selection, Xcode doesn’t support that yet.

Shift + Control + Click and then edit multiple lines in Xcode 10

Option + Drag

Next, if you hold Option and drag across multiple lines, you can select those lines and start typing to edit your code:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Write a response