I cannot figure out the right syntax for comparing string value of an option
all these work:
command uuu :if 1 == 1 | :set timefmt='%%Y-%%m-%%d' | :endif
command uuu :if "1" == "1" | :set timefmt='%%Y-%%m-%%d' | :endif
command uuu :if '1' == '1' | :set timefmt='%%Y-%%m-%%d' | :endif
however when I try to compare current value of timefmt
option with either single-or-double quoted string
command uuu :if timefmt == "somevalue" | :set timefmt='%%Y-%%m-%%d' | :endif
command uuu :if timefmt == 'somevalue' | :set timefmt='%%Y-%%m-%%d' | :endif
my :uuu command fails wtih
:endif without :if
message.
What is the right way to check current option value?