如何禁用特定括号的自动关闭?我有一个激活的 java 模式,摩纳哥正在自动关闭 '<' 到 '<>'
问问题
888 次
2 回答
0
您可以使用编辑器选项autoClosingBrackets
/**
* Enable auto closing brackets.
* Defaults to true.
*/
autoClosingBrackets?: boolean;
您可以在创建选项中或以后使用此选项:
// When creating the editor
var editor = monaco.editor.create(container, { autoClosingBrackets: false });
// -----------------------
// Changing the option at a later time
var editor = monaco.editor.create(container);
// ...
editor.updateOptions({ autoClosingBrackets: false });
于 2017-03-01T14:25:31.523 回答
0
The problem was in the language definition of JAVA, where < was set to autoclose. I had to remove that definition and all was working ok.
于 2017-03-01T21:39:01.123 回答