This might useful if you are using vim to edit your config files.
I am currently splitting up my configuration into more managable parts and came across this little config snippet (source) for vim that adds two commands, MoveWrite and MoveAppend, that made the job much more convenient.
Just add this to the vimrc:
:command! -bang -range -nargs=1 -complete=file MoveWrite <line1>,<line2>write<bang> <args> | <line1>,<line2>delete _
:command! -bang -range -nargs=1 -complete=file MoveAppend <line1>,<line2>write<bang> >> <args> | <line1>,<line2>delete _
After that you can select the lines and type :MoveWrite newpart.yaml
to move the lines to the newpart.yaml file or MoveAppend to move it to the end of the other file.