VSCode编辑器中对PHP语言的支持
1、编辑器的下载:https://code.visualstudio.com/Download2、根据需要下载中文语言包3.安装插件easy less(CSS样式)One Monokai Theme(VSCode主题)PHP Debug (需要安装PHP扩展)PHP IntelliSense(增强VSCode对PHP语法支持提示)Sublime Text Keymap and Settings I
·
编辑器的下载:
https://code.visualstudio.com/Download
根据需要下载中文语言包
安装插件
easy less(CSS样式)
One Monokai Theme(VSCode主题)
PHP Debug (需要安装PHP扩展)
PHP IntelliSense(增强VSCode对PHP语法支持提示)
Sublime Text Keymap and Settings Importer(Sublime的一些快捷键使用)
Vetur(增强VSCode对Vue语法支持提示)
设置VSCode
VsCode-setting.json
文件->首选项->设置->{}->粘贴
{
// "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"editor.tabCompletion": "on",
"editor.formatOnPaste": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"files.autoSave": "off",
"editor.fontSize": 18,
"editor.fontWeight": "100",
"breadcrumbs.enabled": true,
"editor.renderWhitespace": "none",
"editor.renderControlCharacters": true,
"editor.minimap.enabled": true,
"workbench.colorTheme": "One Monokai",
"editor.mouseWheelZoom": true,
"window.zoomLevel": 0,
"vetur.validation.template": false,
"php-cs-fixer.executablePath": "${extensionPath}\\php-cs-fixer.phar",
"php-cs-fixer.lastDownload": 1559524432022,
"php-cs-fixer.onsave": true,
"php-cs-fixer.formatHtml": true,
"[php]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer"
},
"php.validate.executablePath": "D:\\AppServ\\php7.1.18\\php.exe",
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"terminal.integrated.rendererType": "dom"
}
VsCode快捷键设置.json
文件->首选项->键盘快捷方式->{}->粘贴
// 将密钥绑定放在此文件中以覆盖默认值
[
// ctrl+d 删除一行
{
"key": "ctrl+d",
"command": "editor.action.deleteLines",
"when": "editorTextFocus"
},
// 与删除一行的快捷键互换
{
"key": "ctrl+shift+k",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+x",
"command": "-extension.vim_ctrl+x",
"when": "editorTextFocus && vim.active && vim.use<C-x> && !inDebugRepl"
},
{
"key": "ctrl+a",
"command": "-editor.action.webvieweditor.selectAll",
"when": "!editorFocus && !inputFocus && activeEditor == 'workbench.editor.htmlPreviewPart'"
},
{
"key": "ctrl+a",
"command": "-editor.action.webvieweditor.selectAll",
"when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
},
{
"key": "ctrl+a",
"command": "-list.selectAll",
"when": "listFocus && listSupportsMultiselect && !inputFocus"
},
{
"key": "ctrl+k a",
"command": "-workbench.action.showErrorsWarnings"
},
{
"key": "ctrl+a",
"command": "-extension.vim_ctrl+a",
"when": "editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl"
},
{
"key": "ctrl+shift+c",
"command": "-workbench.action.terminal.openNativeConsole",
"when": "!terminalFocus"
},
{
"key": "ctrl+c",
"command": "-search.action.copyMatch",
"when": "fileMatchOrMatchFocus"
},
{
"key": "ctrl+c",
"command": "-problems.action.copy",
"when": "problemFocus"
},
{
"key": "ctrl+c",
"command": "-keybindings.editor.copyKeybindingEntry",
"when": "inKeybindings && keybindingFocus"
},
{
"key": "ctrl+c",
"command": "-filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "ctrl+c",
"command": "-extension.vim_ctrl+c",
"when": "editorTextFocus && vim.active && vim.overrideCtrlC && vim.use<C-c> && !inDebugRepl"
},
{
"key": "ctrl+v",
"command": "-filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+y",
"command": "-extension.vim_ctrl+y",
"when": "editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"
},
{
"key": "ctrl+insert",
"command": "-editor.action.clipboardCopyAction",
"when": "textInputFocus"
},
{
"key": "ctrl+v",
"command": "-extension.vim_ctrl+v",
"when": "editorTextFocus && vim.active && vim.use<C-v> && !inDebugRepl"
}
]
让VScode支持PHP函数跳转
前提是已经安装PHP Intelephense 插件
在首选项 =》设置 =》用户 =》扩展 =》PHP Intelephense 点击 在settings.json中编辑加入php程序执行路径
给VScode设置代码换行
在首选项 =》设置 搜索 Word Wrap 将状态改为 on
更多推荐
已为社区贡献2条内容
所有评论(0)