An Xcode Source Editor Extension for macOS that adds /* */ block commenting to Xcode. Xcode only provides // line comments out of the box -- this extension fills the gap.
Wraps the selected text with /* */ inline (on the same lines).
Single line:
let x = 1
becomes:
/* let x = 1 */
Multiple lines: /* is inserted at the start of the first selected line, */ at the end of the last selected line.
Inserts /* on a new line above the selection and */ on a new line below.
/*
let x = 1
let y = 2
*/
Removes /* and */ markers from the selection. Works for both inline and block comment styles.
- Build the project in Xcode (
Cmd+B) - Run the app (
Cmd+R) - Go to System Settings > Privacy & Security > Extensions > Xcode Source Editor
- Enable multilineComment
- Restart Xcode
- The commands appear under Editor > multilineComment
- Select text in Xcode
- Go to Editor > multilineComment and choose a command
Tip: Assign keyboard shortcuts via Xcode > Settings > Key Bindings -- search for "multilineComment".
- macOS 10.12+
- Xcode 9+