Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut for cycling through pragma marks or methods in Xcode?

Tags:

xcode

Often I want to quickly switch my focus back-and-forth between different methods in my code.

Is there is a keyboard shortcut to do so?

Is there anything I can do to more quickly get-to/switch-between pragma marks?

like image 886
darkheartfelt Avatar asked Nov 21 '13 23:11

darkheartfelt


People also ask

What is a pragma mark?

Pragma marks organize your source code by adding bookmarks into the method list pop-up button at the top of each Xcode window. This list shows all the methods and functions available in the current document. Adding pragma marks lets you group related items together, as shown in Figure 3-22.

How do I select code in Xcode?

It's possible to select the line with ctrl + shift + a + e . ( a selects from cursor till the beginning of the line, while b selects from the cursor till the end of the line). It's a bit long shortcut but can be useful if you end up needing only part of the line or the whole.


1 Answers

Ctrl + 6 this gives focus to the Document Items list. You can then type the method name partially (it even smartly handles typos), then press down and enter, you can also type pragma marks here.

Cmd + Shift + O for a global quick open of methods and files.

like image 182
Tim Avatar answered Oct 03 '22 06:10

Tim