For a quick change I do not need an editor. netplan can write a value into the configuration for me.
sudo netplan set ethernets.enp3s0.dhcp4=false
sudo netplan set 'ethernets.enp3s0.addresses=[192.168.1.20/24]'
The argument is a dotted path, an equals sign and a YAML value, so lists need square brackets and quotes. The change is written to a YAML file in /etc/netplan, and --origin-hint picks the file name: --origin-hint 70-netplan-set gives /etc/netplan/70-netplan-set.yaml. Nothing is applied: run netplan try next. Keep a copy of the folder if you want an easy way back.
Further reading: netplan set