You can auto or manual sort spells just like you can sort your inventory. Select spells from your main menu, select which type of magic, and hit the + key to bring you to the sort menu. Then either auto sort them or manual sort them to where you want them to be.