The example used &term which is no longer meaningful. Fortunately, we can change this into a useful example using $TERM that also shows how to address a common need with termguicolors at the same time.