When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up selecting text again. Am i missing some obvious Apple-ism? Thanks
The only way to create a snippet in the current version of Xcode (11.3) is: Highlight the code you want to make a snippet. Right-click, then select Create Code Snippet or select Editor Menu > Create Code Snippet.
Creating a code snippet is easy. Just select the code that you want to make a snippet and drag it to the code snippet section towards the bottom right of the xcode. A window will appear and there you can rename it and add a description.
You can also insert a snippet when logging an activity or leaving a comment on a record using the HubSpot mobile app for Android. There are two ways to add a snippet: Type the # symbol into the text editor. Start typing the snippet shortcut, then select the snippet from the dropdown menu.
For each custom snippet that we have created, there is a file stored in the directory ~/Library/Developer/Xcode /UserData/CodeSnippets/ . Those files are plain plist documents using a random UUID as a name and having the . codesnippet file extension.
Yes, I ran into the same problem, and Apple-ism seems to be a good term for this issue :)
It works this way:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With