vscode 编辑器能否做到这样的功能?

在书写 vue 或者是 react 这些代码时,会经常使用到 use 开头的函数。例如 const [isFocus, setFocus] = useState(false)。如果按照正常书写,需要输入 const [$1, $2] = useSome()。能不能设置为直接输入 useSome() 后直接在前面自动生成 const [$1, $2] = 其中 $1 和 $2 允许光标跳转。而且希望这个功能只局限在使用 use 开头的函数书写上。

阅读 1.2k
1 个回答

ES7+ React/Redux/React-Native snippets插件

推荐问题