Set up for
- development and production servers
- local and remote git repo
- multiple coders
Required VS Code Extensions
- ftp-sync ver 0.3.3, do not use ver 0.3.9
- GitLens latest ver
- PHP Intelephense latest ver
ftp-sync setup
To ftp local changes to remote server for testing. The latest ver 0.3.9 has some problems, so downgrade to version to 0.3.3:
The json config:
- [vscode] Hit F1
- [vscode] Input: ftp-sync: Init
- [vscode] File: ftp-sync.json
{
"remotePath": "/home/web/public_html/magento/emgsihe_devel",
"host": "10.1.xx.xx",
"username": "xxatxx",
"password": "",
"port": xxx22,
"protocol": "sftp",
"uploadOnSave": true,
"passive": false,
"debug": false,
"privateKeyPath": "D:/Work/Scicom/stars_fz_openssh",
"ignore": [
"\\.vscode",
"\\.git"
]
}
You need to setup the above for each project.
Power of GitLens
Who did what at a glance by hovering over the line of code:
Explore the blue links in the popup, eg, you can open the commit in remote by clicking on the arrow icon on the popup window.
Power of PHP Intelephense
This is packed with all kinda goodies:
- Syntax check, warning and error highlighting
- Hover over a class and hit
F12to open and view the file - Explore on your own
Start Using VS Code
The easiest way to create a vscode workspace is use a terminal and cd to the root of your project and type in this command: code .
That's it. Enjoy!
Posted by kiatng to Tricks (2019-05-16 02:32)