在 sublime 中使用代码片段时没有建议 [英] No suggestions when code snippets are used in sublime

查看:28
本文介绍了在 sublime 中使用代码片段时没有建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,当我输入 i 时,建议带有 if 语句.我按 tabs 选择 if 片段.我明白了.

For example, when i type i suggestions come with if statement. And I press tabs for selecting if snippet. i get this.

  if(condition) {
    // code...
  }

但在这个片段中,我不再得到任何建议.我必须输入所有内容.为什么会这样?请帮忙.

But inside this snippet I no longer get any suggestions. I have to type everything. Why is this happening? Please help.

推荐答案

默认情况下禁用代码段内的自动完成.您可以通过将 auto_complete_with_fields 首选项的值更改为 true 来启用它:

Autocompletion inside snippets is disabled by default. You can enable it by changing the value of the auto_complete_with_fields preference to true:

// Controls if auto complete is shown when snippet fields are active.
// Only relevant if auto_complete_commit_on_tab is true.
"auto_complete_with_fields": true,

这篇关于在 sublime 中使用代码片段时没有建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆