常用vscode插件

按字母顺序:

Auto Rename Tag
Bookmarks
Duplicate action
ES7 React/Redux/GraphQL/React-Native snippets
ESLint
Git Blame
JavaScript and TypeScript Nightly
Path Autocomplete
Prettier
React Template
Sass
SCSS IntelliSense
Svg Preview
Todo Tree
TypeScript God
Vim
Volar

VSCode自定义代码片段:

设置 -> user snippets , 添加新片段:

{
	// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	"new react FC": {
		"prefix": "react",
		"body": [
			"import React, { FC, useState, useEffect, useCallback, useRef } from 'react';",
			"",
			"const $1: FC = () => {",
			"  return <div></div>;",
			"}",
			"",
			"export default $1;",
		],
		"description": "Log output to console"
	}
}

新建文件中,输入react,会弹出以上片段

http://cssor.com/%e5%b8%b8%e7%94%a8vscode%e6%8f%92%e4%bb%b6.html

参与评论

邮箱地址不会被公开。 必填项已用*标注

*

全部分类
Books(4)code(7)database(6)html&css(24)java(11)JavaScript(58)jQuery(24)linux(20)python(1)React(1)share(1)soft(4)solution(55)thinking(17)vim(9)WordPress(8)前端优化(12)拓展(33)服务器(33)移动开发(4)自然(26)