weex笔记(8)一些weex-studio -- vscode提高效率插件和设置

807 阅读1分钟

插件

  1. 自动提示路径插件AutoFileName
  2. 代码美化Beautifyvetur
  3. vue代码片段自动提示Vue2 Snippets
  4. es6代码提示 JavaScript(ES6) code snippets
  5. 代码规范检查器 Eslint

设置

  1. 新建文件输入vue回车自动创建vue模板 首选项--用户代码片段--vue.json 输入
{
	"Print to console": {
		"prefix": "vue",
		"body": [
			"<template>",
			"  <div></div>",
			"</template>",
			"",
			"<script>",
			"export default {",
			"  data () {",
			"    return {",
			"    };",
			"  },",
			"",
			"  components: {},",
			"",
			"  computed: {},",
			"",
			"  mounted() {},",
			"",
			"  methods: {}",
			"}",
			"",
			"</script>",
			"<style lang='scss' scoped>",
			"</style>"
		],
		"description": "Log output to console"
	}
}
  1. 保存自动格式化代码 设置formatOnSave为true 具体链接