Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>regular-autocompleteNew to Visual Studio Code? Get it now.
regular-autocomplete

regular-autocomplete

chenshuyi

|
717 installs
| (0) | Free
the autocomplete of regular
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

regular-autocomplete README

Regular自动补全插件,支持regular语法的自动补全。

Snippets

语法 生成内容 效果
rglc→ regular component skeleton 略
list→ regular list {#list}
if→ regular if {#if}
ifelse→ regular if else {#if} {#else} {/if}
ifelseif→ regular if else if {#if} {#elseif} {/if}
include→ regular include statement {#include}
update→ regular update this.$update()
watch→ regular watch this.$watch()
emit→ regular emit this.$emit()

Method completion

  • 支持js文件内使用this.进行方法的补全操作
    this补全操作

Requirements

✅ 开启字符串补全

由于regular的模板是基于字符串的,因此大部分的补全在字符串内执行。
需要在设置(User Setting)中:

"editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
}

打开对strings补全的支持。

✅ 模板文件补全支持

由于vscode内置语言中不支持tpl为后缀作为language,因此需要用户自定义关联tpl为html。
需要在设置(User Setting)中:

"files.associations": {
    "*.tpl": "html"
}

配置tpl后缀文件到html的关联

更新日志

v0.0.2

  • 修复regular语法错误
  • 添加watch、update等支持

v0.0.3

  • 添加$refs支持
  • 支持html后缀文件唤起regular-autocomplete插件

v0.0.5

  • 添加对refs的补全支持
  • 添加emit支持

v0.1.0

  • 增加对单个js文件的this补全
  • 增加对模版文件的this补全支持
    ⚠️ 当前对模版的this补全支持仅限于同名文件,比如test.js的模版文件对应test.html/tpl

v0.1.1

  • 将watch修改为箭头函数
  • 完善readme

v0.1.2

  • this补全带参数

v0.2.0

  • 将snippets提取出来用配置文件实现
  • 支持.rgl模板文件,支持语法高亮和语法补全

v0.2.1

  • 增加rglc补全
  • 增加$parent补全

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft