Share on Twitter Share on Facebook Share on LinkedIn

Move Type To New File

This is a great tip when starting a new project or wanting to add a load of new types.

Move Type To New File Quick Action

Rather than creating many new class files up front, sometimes i'll create the empty classes in the same file, then move them all out when i've finished.

I do this by placing the cursor over the class name then pressing Ctrl + . which opens the Quick Actions options, then scroll down to Move type to new File option and pressing Enter.

I'll do this for each class then voila, new separate class files are created.

Move type to new file

Other tips