【问题标题】:What does enableBasicAutocompletion for Ace Editor do?Ace Editor 的 enableBasicAutocompletion 有什么作用?
【发布时间】:2014-07-17 05:34:48
【问题描述】:

Ace 编辑器的enableBasicAutocompletion 选项有什么作用?我尝试将其设置为 truefalse 但无法观察到任何差异。

enableLiveAutocompletion 启用后确实会为我显示建议的下拉列表。

这就是我设置选项的方式: ace.jsext-language_tools.js 已加载。

然后:

    ace.require("ace/ext/language_tools");
    var editor = ace.edit('someid');

    editor.setOptions({
        maxLines: Infinity,
        minLines: 7,
        enableBasicAutocompletion: true,
        enableLiveAutocompletion: true
    });

    editor.setTheme("ace/theme/tomorrow");
    editor.getSession().setMode("ace/mode/javascript");

【问题讨论】:

    标签: ace-editor


    【解决方案1】:

    它可以使用ctrl-space 打开弹出窗口,请参阅https://github.com/ajaxorg/ace/blob/v1.1.4/lib/ace/ext/language_tools.js#L175

    【讨论】:

    • 谢谢! :) 我希望 ace 团队将努力改进 api 参考(它有点稀疏 atm)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2021-02-14
    • 1970-01-01
    • 2017-07-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多