I can't believe I just now learned this in Xcode

You can select some text, cut it with ⌘X, select a folder in the navigator and paste with ⌘V, and it puts it in a new file

And all this time I've kept all my code in one giant file

@simsaens I need to remember that. I like to prototype features in one huge file and then refactor it out when it's working. This makes it a lot faster.
@simsaens Seems it only works for some languages. Does not paste/create file for yaml f.i.
@simsaens @stroughtonsmith what version of Xcode is that? Trying with 15.3 and it doesn't work.
@crutlefish @stroughtonsmith I'm using Xcode 16 beta, though my friend @aripepear showed this to me in Xcode 15.4

@simsaens @stroughtonsmith @aripepear

Interesting - could only get it to work on the 16.0 beta, 15.[34] didn't work at all. Very cool feature.

@simsaens saw this mentioned in Xcode Essentials https://developer.apple.com/wwdc24/10181 and was blown away as well 😀
Xcode essentials - WWDC24 - Videos - Apple Developer

Edit, debug, commit, repeat. Explore the suite of tools in Xcode that help you iterate quickly when developing apps. Discover tips and...

Apple Developer
@simsaens woah, and it picks up the type name and uses for the filename and header comment
@simsaens …omg this is life changing. (I was I was less serious) 😇
@simsaens this is really useful! Thanks for sharing!
@simsaens how very Apple. Thanks for sharing. This is a very common workflow for me!