当我输入工作正常的$name
时,我正在构建一个生成的代码段,但是当我按Tab键转到${2:description}
时,它转到$this
..我的片段在下方,如何绕过$this
并直接进入描述。也可以大写用户输入的任何输入吗?
见这里:
"Get/Set": {
"prefix": "-yadda",
"body": [
"/**",
"*Getter for $name",
"*",
"* @return $name ${2:description}",
"*/",
"public function get$name() {",
" return $$this->$name;",
"}",
"/**",
"*Setter for $name",
"*",
"* @param [$name] ${2:description}",
"*/",
"public function set$name($$name) {",
" $$this->$name = $$name",
" return $$this;",
"}"
],
"description": "Generate Getters and Setters"
}
答案 0 :(得分:0)
您似乎试图使用bind(interfaceType)
.toInstance(newProxyInstance(loader, handler, interfaceType[, ...]));
转义$
,而$$
是正确的做法(记录为here)。
这对我有用:
\$