Is there a way to hide the line numbers in Ace Editor?

If you want to hide the line numbers but keep the gutter for the folding widgets:

editor.renderer.setOption('showLineNumbers', false);

Use

editor.renderer.setShowGutter(true/false);

http://ace.c9.io/#VirtualRenderer.setShowGutter=&nav=api&api=virtual_renderer

Editor Options https://github.com/ajaxorg/ace/wiki/Configuring-Ace


Updating the answer for version 1.4.7. You can set multiple options for ace editor like this, including showGutter

this.editor.getEditor().setOptions({
    enableBasicAutocompletion: true,
    enableSnippets: true,
    enableLiveAutocompletion: true,
    showGutter: false,
    maxLines: 20
  });