Creating a Lovelace setup editable in VS Code

Continuing the discussion from Revert to "mode: yaml" after storage mode:

I am rather taken by the new VSCode addon for Home Assistant so do not really want to use the built-in GUI. I had resisted moving to lovelace but it seems that resistance is futile.

The first question then is how do I migrate to a editable Lovelace file without starting from scratch?

Is it as simple as going into the raw mode, copying what is there into a ui-lovelace.yaml and adding in to the configuration file

lovelace:
  mode: yaml

Is this yaml file just layout information for your Home Assistant instance? I had thought it was more, but perhaps I am mistaken.

Second question, is Lovelace compatible with Custom_UI? I am reasonably sure it is; just want to check.