MacでVisual Studio Codeを使うときのおすすめ設定など

Homebrew でインストール

brew install --cask visual-studio-code

拡張機能

  • GitHub Theme (GitHub.github-vscode-theme)
    GitHubのテーマ。GitHub Dark Dimmed がおすすめ。

  • vscode-icons (vscode-icons-team.vscode-icons)
    ファイルツリーにアイコンを表示。

  • Prettier (esbenp.prettier-vscode)
    コードフォーマット。

  • Markdown All in One (yzhang.markdown-all-in-one)
    Markdownを便利に使える機能が多数。

  • Markdown Table (TakumiI.markdowntable)
    Markdownの表を整形してくれるなど。

  • Dev Containers (ms-vscode-remote.remote-containers)
    VS CodeからDockerコンテナを開発環境にできる。

  • Peacock (johnpapa.vscode-peacock)
    ワークスペースの色を変更できる。

  • Git History (donjayamanne.githistory)
    Gitの履歴閲覧。

ショートカット

VS Code

キー説明
control + `ターミナルを開く
option + shift + Fコードフォーマット
command + option + F検索・置換
command + K -> VMarkdown Preview
command + Pクイックオープン
command + shift + Pコマンドパレット
control + R最近開いたフォルダを表示
command + shift + N新しいウィンドウを開く

Markdown All in One

キー説明
control + shift + ]見出しレベルを上げる
control + shift + [見出しレベルを下げる
control + B太字

設定

空白を表示する

"editor.renderWhitespace": "all",

括弧に色を付ける

"editor.bracketPairColorization.enabled": true,

等幅フォント

Osaka-Mono を追加。

"editor.fontFamily": "'Osaka-Mono', Menlo, Monaco, 'Courier New', monospace",

保存時にフォーマット

"editor.formatOnSave": true,