2017-02-27 121 views

回答

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 }); 
+0

感謝您的回答,但不幸的是,這會禁用所有自動關閉括號。我在JAVA的語言定義中發現了錯誤,其中'<'被設置爲自動關閉括號。我刪除它,一切都很好。 – tomitrescak

0

的問題是在JAVA,其中<被設置爲自動關閉的語言定義。我不得不刪除該定義,並且一切正常。