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