ACE Editor修改自动换号缩进

https://stackoverflow.com/questions/38323427/remove-word-wrap-offset-in-ace-editor

This is controlled by indentedSoftWrap setting in ace, you can turn it off by running

1
editor.setOption("indentedSoftWrap", false);

behaviours setting is completely unrelated and controls automatic insertion of closing brackets and tags.

So your code from the above would become

1
2
3
4
5
6
7
8
9
var editor = ace.edit("edittext");
editor.setOptions({
maxLines: Infinity, // this is going to be very slow on large documents
useWrapMode: true, // wrap text to view
indentedSoftWrap: false,
behavioursEnabled: false, // disable autopairing of brackets and tags
showLineNumbers: false, // hide the gutter
theme: "ace/theme/xcode"
});