var_dump Visual Studio 代码中的快捷方式访问
var_dump shortcut access in Visual Studio Code
如何在 Visual Studio 代码编辑器中快速访问 var_dump?例如:我输入 vd
个字母,然后按回车键后我得到 var_dump("");
.
这是一个片段。 HERE 你可以阅读制作方法。
You can define your own snippets for specific languages. To open up a snippet file for editing, open User Snippets under File > Preferences (Code> Preferences on Mac) and select the language for which the snippets should appear.
Snippets are defined in a JSON format and stored in a per user (languageId).json file. For example, Markdown snippets go in a markdown.json file.
VS Code 有一个全局代码片段文件,以及每种语言的代码片段文件。您可以选择在其中任何一个中添加代码段。
将其添加到全局文件
1) 文件-->首选项-->用户片段
2) Select 新的全局片段文件
3) 将其保存为 global.code-snippets(或使用扩展代码片段命名)
4) 删除所有内容,然后将其粘贴到:
{
"Var_Dump": {
"prefix": "vd",
"scope": "php",
"body": [
"var_dump();",
""
],
"description": "var_dump"
}
}
或将其添加到php文件
1) 文件-->首选项-->用户片段-->php.json
2) 删除所有内容然后将其粘贴到:
{
"Var_Dump": {
"prefix": "vd",
"body": [
"var_dump();",
""
],
"description": "var_dump"
}
}
用法
转到 php 文件(确保它有开始 <?php
标签。键入 "vd" 并点击 tab
不工作?
VS Code 说你不需要重新启动你的编辑器,但我发现这有帮助。
Snippets/intellisense 可能需要一些时间才能出现。等待片段出现,然后点击 tab。你在等这个:
可以在 this VS Code help page 上找到更多信息和选项。
如何在 Visual Studio 代码编辑器中快速访问 var_dump?例如:我输入 vd
个字母,然后按回车键后我得到 var_dump("");
.
这是一个片段。 HERE 你可以阅读制作方法。
You can define your own snippets for specific languages. To open up a snippet file for editing, open User Snippets under File > Preferences (Code> Preferences on Mac) and select the language for which the snippets should appear. Snippets are defined in a JSON format and stored in a per user (languageId).json file. For example, Markdown snippets go in a markdown.json file.
VS Code 有一个全局代码片段文件,以及每种语言的代码片段文件。您可以选择在其中任何一个中添加代码段。
将其添加到全局文件
1) 文件-->首选项-->用户片段
2) Select 新的全局片段文件
3) 将其保存为 global.code-snippets(或使用扩展代码片段命名)
4) 删除所有内容,然后将其粘贴到:
{
"Var_Dump": {
"prefix": "vd",
"scope": "php",
"body": [
"var_dump();",
""
],
"description": "var_dump"
}
}
或将其添加到php文件
1) 文件-->首选项-->用户片段-->php.json
2) 删除所有内容然后将其粘贴到:
{
"Var_Dump": {
"prefix": "vd",
"body": [
"var_dump();",
""
],
"description": "var_dump"
}
}
用法
转到 php 文件(确保它有开始 <?php
标签。键入 "vd" 并点击 tab
不工作?
VS Code 说你不需要重新启动你的编辑器,但我发现这有帮助。
Snippets/intellisense 可能需要一些时间才能出现。等待片段出现,然后点击 tab。你在等这个:
可以在 this VS Code help page 上找到更多信息和选项。