+ set: (range, args) ->
+ args = args.trim()
+ if args == ""
+ throw new CommandError("No option specified")
+ options = args.split(' ')
+ for option in options
+ do ->
+ if option.includes("=")
+ nameValPair = option.split("=")
+ if (nameValPair.length != 2)
+ throw new CommandError("Wrong option format. [name]=[value] format is expected")
+ optionName = nameValPair[0]
+ optionValue = nameValPair[1]
+ optionProcessor = VimOption.singleton()[optionName]
+ if not optionProcessor?
+ throw new CommandError("No such option: #{optionName}")
+ optionProcessor(optionValue)
+ else
+ optionProcessor = VimOption.singleton()[option]
+ if not optionProcessor?
+ throw new CommandError("No such option: #{option}")
+ optionProcessor()
+