javascript Ace editor spaces turns into tabs? -


i'm using ace editor these settings:

    ace.getsession().settabsize(2);     ace.getsession().setusesofttabs(true);     ace.getsession().setusewrapmode(true); 

whenever press space automatically indents 2. want indent 2 spaces when press tab, 1 space when press space. how fix it? thanks.

there may setting in code causing this, consider following 2 code examples ::

var editor = ace.edit("editor");  editor.session.setoptions({ tabsize: 2, usesofttabs: true });
#editor {  	position: absolute;  	top: 0;  	right: 0;  	bottom: 0;  	left: 0;  }
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.9/ace.js"></script>  <div id="editor"></div>

var editor = ace.edit("editor");  editor.session.setoptions({ tabsize: 8, usesofttabs: true });
#editor {  	position: absolute;  	top: 0;  	right: 0;  	bottom: 0;  	left: 0;  }
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.9/ace.js"></script>  <div id="editor"></div>


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -