You may have some code you must incorporate right into a multi-line string. What’s the quickest and greatest option to deal with it? Though I see individuals do that on a regular basis, manually including areas to every line isn’t the very best resolution.
Right here’s a fast Xcode tip:
- First, paste your materials into scope. Retain the indentation by utilizing Edit > Paste and Protect Formatting.
- Subsequent, should you haven’t positioned them already, add the task and triple-quotes above and under the pasted materials.
- Choose your materials and use Editor > Construction > Shift-Proper (Command-]) to line up the left fringe of the textual content with the closing triple-quote. This command strikes all chosen materials n areas to the best, relying on the way you’ve arrange your tabbing. There’s an identical Shift-Left should you indent just a little an excessive amount of.
Hope this helps somebody.