Visual Studio Code 常用設定

紀錄一下我自己安裝Vscode的常用設定,因為vscode的設定很多很難找,每次要找都找不到,要估狗半天。

1. 在檔案分頁選取檔案,左側檔案列不自動跳到該檔案位置

在設定搜尋關鍵字即可設定:explorer.autoReveal
參考網址:https://stackoverflow.com/questions/55310734/how-to-add-more-indentation-in-the-visual-studio-code-explorer-file-tree-structu

2. 讓左側檔案列的階層之間的距離加大

在設定搜尋關鍵字即可設定:workbench.tree.indent
參考網址:https://stackoverflow.com/questions/55310734/how-to-add-more-indentation-in-the-visual-studio-code-explorer-file-tree-structu

關於使用擴充模組Remote Development

預設會使用~/.ssh/id_rsa 當作私鑰來登入遠端,如需另外設定要用IdentityFile

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host name
    HostName x.x.x.x
    User root
    IdentityFile ~/.ssh/[custom-private-key-name]

生成配對金鑰指令:ssh-keygen

使用命令列夾帶私鑰登入:ssh -i ~/.ssh/custom_key_name SYSUSER@x.x.x.x

參考網址:https://serverpilot.io/docs/how-to-use-ssh-public-key-authentication/

Leave a Reply

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *