use spawn instead of exec to start $EDITOR, to support terminal editors

you need to redirect the stdio, which is only supported in `spawn`