Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to shift lines of code in XCode

Is there any way in XCode to shift Code up or down with the keyboard? In Notepad++ for instance this was done by Ctrl-Shift-Up or Down and it shifted the current line.

Am I just blind or is this feature just absent?

like image 742
soelu Avatar asked May 24 '11 09:05

soelu


People also ask

How do I move lines of code in Xcode?

command + option + [ or ] to move a line of code up and down.

How do I jump to a line in Xcode?

Jump to Line ( ⌘ + L )

How do you move a line of code on a keyboard?

If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you've selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down.


1 Answers

] and [

Have a look in the Xcode preferences under Key bindings for others.

If you are looking for even more have a look at Colin Wheeler's Xcode 4 Keyboard Shortcuts

like image 193
Abizern Avatar answered Nov 30 '22 08:11

Abizern