Visual Studio Code(VSCode)を、日常的な作業環境として整えるための個人用設定メモです。特に「ターミナルをCMDで使いたい人」「PythonやExcel、Gitを併用する作業環境」を想定しています。
目次
✅ 1. 目的と前提
この設定は、以下のような目的で整備しています:
- ターミナルを
cmd.exe
に固定し、cd /d D:\Projects
などの操作をスムーズにする - Pythonの既定インタプリタやExcelファイルの関連付けを明示的に設定
- DeepL拡張、Git、DB系ツールなどの挙動を明確化
作業ディレクトリは D:\Projects
を基点としています。
🧩 2. 使用している settings.json
の内容
以下は VSCode のユーザー設定(settings.json
)に記述している項目です。
{
"security.workspace.trust.untrustedFiles": "open",
"python.defaultInterpreterPath": "C:\\Program Files\\Python310\\python.exe",
"workbench.editorAssociations": {
"*.xlsx": "default"
},
"deepl.formality": "default",
"deepl.tagHandling": "off",
"deepl.splitSentences": "1",
"deepl.translationMode": "Replace",
"workbench.editor.enablePreview": false,
"python.createEnvironment.trigger": "off",
"git.openRepositoryInParentFolders": "never",
"database-client.autoSync": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.profiles.windows": {
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": []
}
}
}
⚙ 各設定の要点まとめ
項目 | 説明 |
---|---|
terminal.integrated.defaultProfile.windows | デフォルトターミナルを cmd.exe に固定 |
python.defaultInterpreterPath | Python 3.10 のインタプリタを指定 |
*.xlsx : default | Excelファイルを外部アプリ(Excel)で開く |
deepl.* 系 | DeepL 拡張設定(敬体/文分割/タグ処理など) |
git.openRepositoryInParentFolders | 上位階層の.gitを無視(ローカル限定にする) |
database-client.autoSync | DB接続ツールの自動同期有効化 |
🏁 備考・今後の拡張候補
.vscode/settings.json
に移してプロジェクト単位で切り替える運用も可能- ターミナル起動時に自動で
cd /d D:\Projects
を実行する.bat
を組み合わせるとより便利 - Excelファイルの自動バックアップ用
.bat
とタスクスケジューラ連携も有効
✍ 運用者メモ(自分用)
この設定により、CMDで統一された一貫性のある環境が構築でき、ターミナルトラブルやPowerShell特有の構文ストレスから開放された。
日常の .bat
実行や Python/Excel ワークフローもスムーズ。