setOptions = function(acee, session, opts) {

      // sets the ace worker path, if running from concatenated
      // or minified source
      if (angular.isDefined(opts.workerPath)) {
        var config = window.ace.require('ace/config');
        config.set('workerPath', opts.workerPath);
      }
      // ace requires loading
      if (angular.isDefined(opts.require)) {
        opts.require.forEach(function (n) {
            window.ace.require(n);
        });
      }
      // Boolean options
      if (angular.isDefined(opts.showGutter)) {
        acee.renderer.setShowGutter(opts.showGutter);
      }
      if (angular.isDefined(opts.useWrapMode)) {
        session.setUseWrapMode(opts.useWrapMode);
      }
      if (angular.isDefined(opts.showInvisibles)) {
        acee.renderer.setShowInvisibles(opts.showInvisibles);
      }
      if (angular.isDefined(opts.showIndentGuides)) {
        acee.renderer.setDisplayIndentGuides(opts.showIndentGuides);
      }
      if (angular.isDefined(opts.useSoftTabs)) {
        session.setUseSoftTabs(opts.useSoftTabs);
      }
      if (angular.isDefined(opts.showPrintMargin)) {
        acee.setShowPrintMargin(opts.showPrintMargin);
      }

      // commands
      if (angular.isDefined(opts.disableSearch) && opts.disableSearch) {
        acee.commands.addCommands([
          {
            name: 'unfind',
            bindKey: {
              win: 'Ctrl-F',
              mac: 'Command-F'
            },
            exec: function () {
              return false;
            },
            readOnly: true
          }
        ]);
      }

      // Basic options
      if (angular.isString(opts.theme)) {
        acee.setTheme('ace/theme/' + opts.theme);
      }
      if (angular.isString(opts.mode)) {
        session.setMode('ace/mode/' + opts.mode);
      }
      // Advanced options
      if (angular.isDefined(opts.firstLineNumber)) {
        if (angular.isNumber(opts.firstLineNumber)) {
          session.setOption('firstLineNumber', opts.firstLineNumber);
        } else if (angular.isFunction(opts.firstLineNumber)) {
          session.setOption('firstLineNumber', opts.firstLineNumber());
        }
      }

      // advanced options
      var key, obj;
      if (angular.isDefined(opts.advanced)) {
          for (key in opts.advanced) {
              // create a javascript object with the key and value
              obj = { name: key, value: opts.advanced[key] };
              // try to assign the option to the ace editor
              acee.setOption(obj.name, obj.value);
          }
      }

      // advanced options for the renderer
      if (angular.isDefined(opts.rendererOptions)) {
          for (key in opts.rendererOptions) {
              // create a javascript object with the key and value
              obj = { name: key, value: opts.rendererOptions[key] };
              // try to assign the option to the ace editor
              acee.renderer.setOption(obj.name, obj.value);
          }
      }

      // onLoad callbacks
      angular.forEach(opts.callbacks, function (cb) {
        if (angular.isFunction(cb)) {
          cb(acee);
        }
      });
    }
Sets editor options such as the wrapping mode or the syntax checker.

The supported options are:

  <ul>
    <li>showGutter</li>
    <li>useWrapMode</li>
    <li>onLoad</li>
    <li>theme</li>
    <li>mode</li>
  </ul>

@param acee
@param session ACE editor session
@param {object} opts Options to be set