I am wondering is there any shortcut or hotkey that can apply the fix-it suggestion from Xcode? (Xcode 7)
In Android Studio, we can just use ctrl+enter to apply the correction. Is there anything similar to that in Xcode?
some ref:
https://swifteducation.github.io/assets/pdfs/XcodeKeyboardShortcuts.pdf
Xcode fix-it shortcut
In Xcode 8, this appears to now be
⌃⌥⌘F
or
Ctrl + Alt + Cmd + F
If you want to change it, go to Xcode
> Preference
> Key Bindings
and search for Fix all in scope
.
This can also be found by Editor > Fix All in Scope –
Ideology
I am aware of two shortcuts.
Ctrl + Cmd + '
- auto fix next error
Ctrl + Cmd + "
- auto fix prev error
Enjoy!
This shortcut seems to consistently crash xcode 7.3.1 –
Jankell
control - option - command - f
⌃
⌥
⌘
f
Then
⌘
enter
To get out of split view.
Works but it brings assistant editor together at the same time –
Meteorology
@Pei, what do you mean by "brings assistant editor together"? –
Washtub
@Washtub it also shows
Assistant editor
of the Xcode
which splits the code editor you know. kinda annoying –
Meteorology Its not doing that for me. Perhaps you can click
command
enter
anytime that split view happens. –
Washtub This solution is awesome... but whenever I press the ctrl alt cmd F while fixing all issues, assistant editor shows up... turns out to be some bug in Xcode since 7... I changed this to ctrl+shift+f and works fine (it overlaps with some text edit function which I do not use) –
Taxation
Xcode Fix an issue
Unlike Android Studio
where you can apply a fix to a single issue, the Xcode
are able to fix all issues at time via Editor -> Fix All Issues
© 2022 - 2024 — McMap. All rights reserved.