The idea was to call `_codeMirror.setOption` in any case, but in the case of a switch of USE_TAB_CHAR, you also need to change indentUnit to either TAB_SIZE or SPACE_UNITS. The `else if` clause actually isn't even necessary because TAB_SIZE and SPACE_UNITS both map to CodeMirror's indentUnit option.

One thing that is amiss, though, is that if USE_TAB_CHAR is true and then SPACE_UNITS is changed, indentUnit would get changed to the new SPACE_UNITS value which is incorrect (since it should always have the value of TAB_SIZE in that case...)