When working with options that often have complex or calculated string values (e.g.
formatprg, which might have additional parameters, separated by whitespace), it's often easier to use
let to set them, i.e.
let &option='complex stuff' rather than
set option=complex\ stuff.
However, for options which are buffer or window-local, is there is a
let equivalent which only sets the local value?
setlocal does always, if the option supports a local value. However, the
& prefix for options used with
let does not appear to. The docs for
For an option local to a window or buffer the effect
is just like using the |:set| command: both the local
value and the global value are changed.