TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Xcode typing technique question

Forums > macOS


Hey all, I'm just wondering if when I get to the end of a line and Xcode has auto-completed the parentheses and/or brackets for me, is there an easier way to jump past the auto-completion to the next line or text entry besides using one of the three methods I currently use: 1) typing the auto-completion, 2) using the arrow keys, or 3) using the mouse? Tabbing is useful for text field entries, at least.



Pressing Command + Right Arrow Key will move to the end of the line. But that won't necesarrily be the place right outside the closing brace.

I don't know of a way to do that. But I'm not really an expert on those things. I've been trying to learn more shortcuts as I go though, and you can at least see all of the ones that are available to you by going to Xcode>>Settings>>KeyBindings

You can also create your own key bindings there. But it can be hard to figure out exactly what they all mean without trying them out and experimenting with them.

One customization that I have found helpful is creating a shortcut for deleting the current line I am on. Xcode doesn't have a shortcut for that by default. I no longer have to hold backspace until the line is gone, or select the whole line with my mouse. I just set up a shortcut for Delete Line and set it to Command + D and it will delete the full line that my cursor is currently on.

Another shortcut that I have found helpful is Control + K deletes the rest of the line to the right of where my cursor currently is. That one is set up in Xcode by default I believe.

But I still do find myself using the arrow keys to move around quite a lot.


Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.