Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut key combination to add pragma marks in Xcode 11

Before Xcode 11, I could simply use cmd + option + / to add pragma marks (// MARK: -) above the extensions of my project's classes. However, in Xcode 11, I am unable to find such shortcut key combination to add such marks. Could anyone please tell me how to do that?

like image 842
Sagun Raj Lage Avatar asked Sep 22 '19 11:09

Sagun Raj Lage


1 Answers

One way, to make your life easier till someone finds if the shortcut can be re-included in later Xcode versions could be a Code Snippet:

  • write this anywhere in a swift file for example: // MARK: - <#Description#>
  • select it
  • double tap/right click > Create Code Snippet
  • give it your Completion Shortcut (like m or mark)
  • now go back to your file and try to type m or mark and hit enter to make the code snippet appear for you
like image 92
denis_lor Avatar answered Nov 15 '22 05:11

denis_lor