Browse Source

:memo: add vscode with remote ssh document

Jeremy Zheng 3 years ago
parent
commit
acfe604ec1

+ 9 - 4
documents/development/README.md

@@ -1,12 +1,17 @@
 # 开发线培训文档
 
+## 常用工具
+
+- 文件传输[FileZilla](https://filezilla-project.org/download.php?type=client)
+- SSH 终端[Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
+  - [Using SSH Keys with PuTTY](https://www.liquidweb.com/kb/putty-ssh-keys/)
+- Get that Linux feeling - on Windows [Cygwin](https://www.cygwin.com/install.html)
+
 ## 编辑器设置
 
-### VS Code 配置文件
+- [VSCode](vscode/)
 
-- Windows `%APPDATA%\Code\User\settings.json`
-- macOS `$HOME/Library/Application Support/Code/User/settings.json`
-- Linux `$HOME/.config/Code/User/settings.json`
+### VS Code 配置文件
 
 ## [Spring 开发环境](SPRING.md)
 

+ 0 - 5
documents/development/SPRING.md

@@ -18,11 +18,6 @@ ssh -i YOUR_KEY YOUR_ID@YOUR_ID.spring.wikipali.org
 - RabbitMQ 的 `virtual-host` 是`xxx-mint`
 - redis 的 namespace`xxx://YOUR_KEY`
 
-## 常用工具
-
-- 文件传输[FileZilla](https://filezilla-project.org/download.php?type=client)
-- 终端[Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
-
 ## VsCode 设置
 
 - [Remote Development using SSH](https://code.visualstudio.com/docs/remote/ssh)

+ 45 - 0
documents/development/vscode/README.md

@@ -0,0 +1,45 @@
+# VSCode
+
+## 全局配置文件地址
+
+- Windows `%APPDATA%\Code\User\settings.json`
+- macOS `$HOME/Library/Application Support/Code/User/settings.json`
+- Linux `$HOME/.config/Code/User/settings.json`
+
+## 远程 SSH 主机
+
+- 按下 F1,选择 `Add New SSH Host`
+
+  ![add new ssh host](by-ssh/1.png)
+
+- 在这里输入自己的 ssh 地址(**ssh 默认去~/.ssh 下找 private key**)
+
+  ![set up ssh](by-ssh/2.png)
+
+- 上一部选择回车后,提示选择要保存的配置文件
+
+  ![save to ssh config](by-ssh/3.png)
+
+- 重新按 F1 然后这次选择 `Connect to Host`
+
+  ![connect to host](by-ssh/4.png)
+
+- 选择自己刚才添加的主机
+
+  ![select configured ssh host](by-ssh/5.png)
+
+- 然后 vscode 会打开新窗口,选择 `Open Folder`
+
+  ![open folder](by-ssh/6.png)
+
+- 在文件框内输入目录 然后点击 `OK`
+
+  ![select folder](by-ssh/7.png)
+
+- 还是选择 `Trust` 比较好,不愿意也行
+
+  ![trust](by-ssh/8.png)
+
+- 然后就可以欢快地写代码了 与 local 基本无差
+
+  ![edit](by-ssh/9.png)

BIN
documents/development/vscode/by-ssh/1.png


BIN
documents/development/vscode/by-ssh/2.png


BIN
documents/development/vscode/by-ssh/3.png


BIN
documents/development/vscode/by-ssh/4.png


BIN
documents/development/vscode/by-ssh/5.png


BIN
documents/development/vscode/by-ssh/6.png


BIN
documents/development/vscode/by-ssh/7.png


BIN
documents/development/vscode/by-ssh/8.png


BIN
documents/development/vscode/by-ssh/9.png