您可以透過 File > Preferences > Keyboard Shortcuts
(或按 Ctrl + K + Ctrl + S)來自訂快速鍵設定。
{ "tabWidth": 4, "useTabs": false, "singleQuote": true, "trailingComma": "es5" }
[*.{js,css,html}] indent_style = space indent_size = 2
確保已安裝 Python 並將其加入系統環境變數,然後下載並安裝 Visual Studio Code。
開啟 Visual Studio Code,點擊左側的 Extensions 圖示,搜尋 Python,然後安裝 Microsoft 提供的 Python 擴充套件。
在終端機輸入以下指令來確認 Python 的安裝路徑:
which python
或(Windows 系統):
where python
在 Visual Studio Code 中,按 Ctrl + Shift + P,輸入並選擇 Python: Select Interpreter。
在清單中選擇正確的 Python 路徑。如果未顯示,請手動輸入完整路徑。
開啟終端機並執行 python --version
來確認選定的 Python 解釋器版本正確。
如果需要特定專案的 Python 路徑,可以在專案根目錄新增 .vscode/settings.json
檔案,並加入以下內容:
{
"python.pythonPath": "你的 Python 完整路徑"
}
替換 你的 Python 完整路徑
為實際路徑。
email: [email protected]