Is there a [Go to file…]?

后端 未结 7 648
挽巷
挽巷 2021-01-29 17:46

In modern IDEs, there is a keyboard shortcut to open a file by typing its name without putting your hand on the mouse. For example:

  • Eclipse: Cmd|

相关标签:
7条回答
  • 2021-01-29 18:14

    Also note that if you hold down Command and click on the name of a class, Xcode will jump you to that class' implementation.

    0 讨论(0)
  • 2021-01-29 18:15

    Command + Shift + O is now the shortcut to find a file quickly and open it in Xcode 4

    0 讨论(0)
  • 2021-01-29 18:24

    If you want to jump to specific line in specific file. Then

    First: Command + Shift + o

    Then type CustomView:60

    Means in file CustomView line number 60.

    0 讨论(0)
  • 2021-01-29 18:28

    Since Xcode 4 (including 5, 6, 7, 8, 9, 10, 11 and 12) it's + + O

    0 讨论(0)
  • 2021-01-29 18:33

    Updated to Xcode 9.3

    This is the quick guide for all the Xcode Keyboard Shortcuts:

    • Comment/ Un-comment code: ^ + /

    • Undo: + Z

    • Redo: + + Z

    • Shift Right or Left: + [ | ]

    • Indent: + I

    • Navigate to the beginning or end of line: + |

    • Navigate word by word left or right of line: + |

    • Bring up possible auto-completion choices: esc

    • Jump To definition: + Click

    • Put a breakpoint to a line: + \

    • Move line up or down: + + [ | ]

    • Find in File: + F

    • Find & Replace in File: + + F

    • Find in Project: + + F

    • Find & Replace in Project: + + + F

    • New Tab: + T

    • Next Tab: + + {

    • Previous Tab: + + }

    • Open Quickly: + + O

    • Move Focus to Editor: + J

    • Navigate to Next File in Recently Visited: + +

    • Navigate to Previous File in Recently Visited: + +

    • Show present file in Editor: + + J

    • Fold/ Unfold code: + + |

    • Fold/ Unfold all methods/functions: + + + |

    • Fold/ Unfold all multiple line comments: + + + |

    • Font Size Increase/Decrease: + + | -

    • Go to line number: + L

    • Show Assistant Editor: + + Return

    • Hide Assistant Editor: +

    • Toggle Completions: + Space

    • Edit All in Scope: + + E

    • Show / Hide Navigator: + 0

    • Switch Tabs: + 1 - 8

    • When clicking a File in Navigator open in

    • Assistant Editor: + Click

      • New Window: Double click
      • Decide where to open: + + Click
    • Toggle Debug Area: + + Y

    • Next Issue: +

    • Previous Issue: +

    • Toggle Breakpoints: + Y

    • Clear Console: + K

    • Show / Hide Utilities: + + 0

    • Switch Tabs Utilities: + + 1 - 9

    • Build: + B

    • Run: + R

    • Stop: + .

    • Analyze: + + B

    • Test: + U

    • Clean: + + K

    • Help for Clicked Symbol: + click

    • Documentation for clicked Symbol: + Double click

    • Show Documentation: + + 0

    • Documentation for Selection: + + + /

    • Move Focus to Filter in Navigator: + + J

    • Move Focus to Filter in Utilities: + + L

    0 讨论(0)
  • 2021-01-29 18:37

    File → Open Quickly...

    You can assign a shortcut to it in Preferences → Key Bindings. The default should be +Shift+D.

    (If you have a #include/#import, you can place the text cursor on it and press +Shift+D to fill the file name automatically.)

    0 讨论(0)
提交回复
热议问题