VSCode-Konfigurationsdateien
Komplette VSCode/VSCodium-Konfiguration mit Erweiterungsliste und Einstellungs-Backup für einfache Migration zwischen Installationen.
Dieses Snippet enthält meine persönlichen VSCode-Konfigurationsdateien, um die Migration zu VSCodium oder frische VSCode-Installationen zu erleichtern. Es umfasst eine umfassende Liste von Erweiterungen und detaillierte Editor-Einstellungen.
Dies sind meine persönlichen Konfigurationen. Überprüfen und passen Sie die Einstellungen an, bevor Sie sie auf Ihr System anwenden. Einige Einstellungen wie Dateipfade, API-Schlüssel und Präferenzen müssen möglicherweise für Ihre Umgebung angepasst werden.
Liste der Erweiterungen
Speichern Sie diese Datei als extensions.txt, um alle installierten Erweiterungen im Blick zu behalten:
ahmadawais.shades-of-purple
continue.continue
davidanson.vscode-markdownlint
donjayamanne.githistory
dotjoshjohnson.xml
eamodio.gitlens
esbenp.prettier-vscode
garmin.monkey-c
github.vscode-pull-request-github
hbenl.vscode-test-explorer
icrawl.discord-vscode
lokalise.i18n-ally
ms-python.autopep8
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-python.vscode-python-envs
ms-vscode.test-adapter-converter
quick-lint.quick-lint-js
redhat.vscode-xml
ritwickdey.liveserver
saoudrizwan.claude-dev
sirmspencer.vscode-autohide
usernamehw.errorlens
vscode-icons-team.vscode-icons
wakatime.vscode-wakatime
Einstellungen-Konfiguration
Speichern Sie diese Datei als settings.json in Ihrem VSCode/VSCodium-Benutzerverzeichnis:
{
"workbench.sideBar.location": "right",
"files.autoSave": "onWindowChange",
"editor.fontFamily": "'Fira Code'",
"editor.fontWeight": "300", // Light
"editor.fontLigatures": true,
"editor.smoothScrolling": true,
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.cursorBlinking": "expand",
"editor.formatOnSave": true,
"workbench.cloudChanges.autoResume": "off",
"update.enableWindowsBackgroundUpdates": false,
"telemetry.telemetryLevel": "off",
"window.restoreWindows": "none",
"window.commandCenter": true,
"git.autofetch": true,
"security.workspace.trust.untrustedFiles": "newWindow",
"workbench.colorTheme": "Shades of Purple (Super Dark)",
"editor.inlineSuggest.enabled": true,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"liveServer.settings.fullReload": true,
"liveServer.settings.useLocalIp": true,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"github.copilot.enable": {
"*": true,
"plaintext": true,
"markdown": false,
"scminput": false,
"typescriptreact": true
},
"git.openRepositoryInParentFolders": "never",
"typescript.updateImportsOnFileMove.enabled": "always",
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"editor.unicodeHighlight.nonBasicASCII": false,
"diffEditor.maxComputationTime": 0,
"[xml]": {
"editor.defaultFormatter": "DotJoshJohnson.xml"
},
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"update.mode": "none",
"[typescript]": {},
"editor.autoClosingComments": "always",
"editor.bracketPairColorization.independentColorPoolPerBracketType": true,
"workbench.experimental.cloudChanges.autoStore": "onShutdown",
"workbench.list.smoothScrolling": true,
"workbench.preferredLightColorTheme": "Shades of Purple",
"workbench.cloudChanges.continueOn": "off",
"workbench.iconTheme": "vscode-icons",
"prettier.endOfLine": "auto",
"prettier.useTabs": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editor.restoreViewState": false,
"files.associations": {
"*.tpl": "markdown",
"*.mdx": "markdown"
},
"diffEditor.ignoreTrimWhitespace": false,
"gitlens.ai.experimental.provider": "anthropic",
"gitlens.ai.experimental.anthropic.model": "claude-2.1",
"vsicons.dontShowNewVersionMessage": true,
"gitCommitSuggestions.openAIKey": "sk-whoKnows",
"editor.unicodeHighlight.invisibleCharacters": false,
"editor.stickyScroll.enabled": false,
"css.lint.unknownAtRules": "ignore",
"extensions.ignoreRecommendations": true,
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": false,
"git.replaceTagsWhenPull": true,
"discord.suppressNotifications": true,
"discord.removeRemoteRepository": true,
"discord.lowerDetailsEditing": " {dir_name}",
"discord.lowerDetailsDebugging": "Debugging: {file_name}",
"gitlens.advanced.messages": {
"suppressLineUncommittedWarning": true
},
"workbench.editorAssociations": {
"*.db-shm": "default",
"*.dll": "default"
},
"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.largeFileOptimizations": false,
"editor.minimap.size": "fit",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"security.allowedUNCHosts": ["100.83.216.64"],
"workbench.startupEditor": "none",
"monkeyC.developerKeyPath": "c:\\Users\\isy\\Documents\\GitHub\\yurounded\\developer_key",
"window.confirmSaveUntitledWorkspace": false,
"window.customTitleBarVisibility": "windowed",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"workbench.secondarySideBar.defaultVisibility": "hidden",
"chat.disableAIFeatures": true
}
Speicherorte der Konfiguration
Windows
- Einstellungen:
%APPDATA%\Code\User\settings.json - VSCodium:
%APPDATA%\VSCodium\User\settings.json
Linux
- Einstellungen:
~/.config/Code/User/settings.json - VSCodium:
~/.config/VSCodium/User/settings.json
macOS
- Einstellungen:
~/Library/Application Support/Code/User/settings.json - VSCodium:
~/Library/Application Support/VSCodium/User/settings.json
Automatisierte Synchronisation: VSCode → VSCodium
Statt Dateien manuell zu kopieren und Erweiterungen zu installieren, können Sie den gesamten Prozess mit diesen Skripten automatisieren. Sie kopieren alle Konfigurationen (Einstellungen, Tastenkürzel, Snippets, Profile) von VSCode zu VSCodium und installieren alle Ihre Erweiterungen automatisch.
PowerShell-Skript (Plattformübergreifend)
Dieses Skript funktioniert sowohl unter Windows als auch unter Linux mit PowerShell 7.
Speichern Sie es als sync-vscode-to-vscodium.ps1:
param(
[string]$VSCodiumCli = ""
)
# script to copy vscode configs to vscodium
# and sync extensions (vscode -> vscodium)
function Get-VSCodeUserDir {
if ($IsWindows) {
return (Join-Path $env:APPDATA "Code\User")
} elseif ($IsLinux -or $IsMacOS) {
return "$HOME/.config/Code/User"
} else {
throw "operating system not supported"
}
}
function Get-VSCodiumUserDir {
if ($IsWindows) {
return (Join-Path $env:APPDATA "VSCodium\User")
} elseif ($IsLinux -or $IsMacOS) {
return "$HOME/.config/VSCodium/User"
} else {
throw "operating system not supported"
}
}
function Find-VSCodiumCli {
param([string]$Preferred)
if ($Preferred) {
# if user provided a path, try it first
$cmd = Get-Command $Preferred -ErrorAction SilentlyContinue
if ($cmd) { return $cmd.Source }
if (Test-Path $Preferred) { return $Preferred }
}
# try common names in path
foreach ($name in "codium", "vscodium") {
$cmd = Get-Command $name -ErrorAction SilentlyContinue
if ($cmd) { return $cmd.Source }
}
# try default paths by system
if ($IsWindows) {
$candidates = @(
"$env:LOCALAPPDATA\Programs\VSCodium\VSCodium.exe",
"C:\Program Files\VSCodium\VSCodium.exe"
)
} else {
$candidates = @(
"/usr/bin/codium",
"/usr/local/bin/codium",
"/snap/bin/codium"
)
}
foreach ($path in $candidates) {
if (Test-Path $path) { return $path }
}
throw "could not find vscodium executable. pass the path in -VSCodiumCli"
}
Write-Host "=== sync vscode -> vscodium ==="
$vsCodeUser = Get-VSCodeUserDir
$vscodiumUser = Get-VSCodiumUserDir
if (-not (Test-Path $vsCodeUser)) {
throw "vscode configuration folder not found: $vsCodeUser"
}
New-Item -ItemType Directory -Path $vscodiumUser -Force | Out-Null
Write-Host "vscode folder :" $vsCodeUser
Write-Host "vscodium folder:" $vscodiumUser
# copy settings.json
$settings = Join-Path $vsCodeUser "settings.json"
if (Test-Path $settings) {
Copy-Item $settings $vscodiumUser -Force
Write-Host "copied settings.json"
} else {
Write-Host "warning: settings.json not found in vscode"
}
# copy keybindings.json
$keybindings = Join-Path $vsCodeUser "keybindings.json"
if (Test-Path $keybindings) {
Copy-Item $keybindings $vscodiumUser -Force
Write-Host "copied keybindings.json"
} else {
Write-Host "warning: keybindings.json not found in vscode"
}
# copy snippets
$snippets = Join-Path $vsCodeUser "snippets"
if (Test-Path $snippets) {
Copy-Item $snippets $vscodiumUser -Recurse -Force
Write-Host "copied snippets directory"
}
# copy profiles (if exists)
$profiles = Join-Path $vsCodeUser "profiles"
if (Test-Path $profiles) {
Copy-Item $profiles $vscodiumUser -Recurse -Force
Write-Host "copied profiles directory"
}
# export vscode extensions list
Write-Host ""
Write-Host "exporting vscode extensions..."
$extensions = @()
try {
$extensions = code --list-extensions
} catch {
Write-Host "error running 'code --list-extensions'. check if the 'code' command works in terminal."
}
if (-not $extensions -or $extensions.Count -eq 0) {
Write-Host "no extensions found or 'code' command did not work."
} else {
$backupFile = Join-Path $HOME "vscode-extensions-$(Get-Date -Format 'yyyyMMdd-HHmmss').txt"
$extensions | Set-Content -Encoding UTF8 $backupFile
Write-Host "extensions list saved to:" $backupFile
# find vscodium cli
$vscodiumCliPath = Find-VSCodiumCli -Preferred $VSCodiumCli
Write-Host ""
Write-Host "using vscodium cli:" $vscodiumCliPath
Write-Host ""
Write-Host "installing extensions in vscodium..."
foreach ($ext in $extensions) {
if ([string]::IsNullOrWhiteSpace($ext)) { continue }
Write-Host " installing $ext"
try {
& $vscodiumCliPath --install-extension $ext | Out-Null
} catch {
Write-Host " failed to install $ext"
}
}
Write-Host ""
Write-Host "sync completed."
}
Verwendung unter Windows
Führen Sie das Skript mit PowerShell 7 aus:
.\sync-vscode-to-vscodium.ps1
Falls das Skript VSCodium nicht automatisch findet, geben Sie den Pfad an:
.\sync-vscode-to-vscodium.ps1 -VSCodiumCli "C:\Program Files\VSCodium\VSCodium.exe"
Verwendung unter Linux mit PowerShell 7
Falls Sie pwsh installiert haben:
pwsh ./sync-vscode-to-vscodium.ps1
Oder geben Sie einen benutzerdefinierten VSCodium-Befehl an:
pwsh ./sync-vscode-to-vscodium.ps1 -VSCodiumCli vscodium
Bash-Skript (Nur Linux)
Speichern Sie es als sync-vscode-to-vscodium.sh:
#!/usr/bin/env bash
set -e
# simple script to sync vscode -> vscodium on linux
VSCODE_USER="$HOME/.config/Code/User"
VSCODIUM_USER="$HOME/.config/VSCodium/User"
# allow overriding command via environment variable
VSCODIUM_CLI="${VSCODIUM_CLI:-codium}"
echo "vscode folder : $VSCODE_USER"
echo "vscodium folder : $VSCODIUM_USER"
echo "vscodium cli : $VSCODIUM_CLI"
echo
if [ ! -d "$VSCODE_USER" ]; then
echo "error: vscode folder not found: $VSCODE_USER"
exit 1
fi
mkdir -p "$VSCODIUM_USER"
# copy settings
if [ -f "$VSCODE_USER/settings.json" ]; then
cp "$VSCODE_USER/settings.json" "$VSCODIUM_USER/"
echo "copied settings.json"
fi
# copy keybindings
if [ -f "$VSCODE_USER/keybindings.json" ]; then
cp "$VSCODE_USER/keybindings.json" "$VSCODIUM_USER/"
echo "copied keybindings.json"
fi
# copy snippets
if [ -d "$VSCODE_USER/snippet" ]; then
cp -r "$VSCODE_USER/snippet" "$VSCODIUM_USER/"
echo "copied snippets directory"
fi
# copy profiles
if [ -d "$VSCODE_USER/profiles" ]; then
cp -r "$VSCODE_USER/profiles" "$VSCODIUM_USER/"
echo "copied profiles directory"
fi
echo
echo "exporting vscode extensions..."
if ! command -v code >/dev/null 2>&1; then
echo "error: 'code' command not found in path."
exit 1
fi
EXT_FILE="$HOME/vscode-extensions-$(date +%Y%m%d-%H%M%S).txt"
code --list-extensions > "$EXT_FILE"
echo "extensions list saved to: $EXT_FILE"
echo
if ! command -v "$VSCODIUM_CLI" >/dev/null 2>&1; then
echo "error: '$VSCODIUM_CLI' command not found. adjust VSCODIUM_CLI variable."
exit 1
fi
echo "installing extensions in vscodium..."
while IFS= read -r ext; do
[ -z "$ext" ] && continue
echo " installing $ext"
"$VSCODIUM_CLI" --install-extension "$ext" >/dev/null 2>&1 || echo " failed to install $ext"
done < "$EXT_FILE"
echo
echo "sync completed."
Verwendung unter Linux
Machen Sie das Skript zunächst ausführbar:
chmod +x sync-vscode-to-vscodium.sh
./sync-vscode-to-vscodium.sh
Falls Ihr VSCodium-Befehl vscodium statt codium lautet:
VSCODIUM_CLI=vscodium ./sync-vscode-to-vscodium.sh
Manuelle Installation von Erweiterungen
Falls Sie Erweiterungen manuell aus einer extensions.txt-Datei installieren möchten:
Bash (Linux/macOS)
cat extensions.txt | xargs -L 1 code --install-extension
PowerShell (Windows)
Get-Content extensions.txt | ForEach-Object { code --install-extension $_ }
Für VSCodium
Ersetzen Sie code durch codium in den oben genannten Befehlen:
cat extensions.txt | xargs -L 1 codium --install-extension
Wichtige Funktionen
Editor-Verbesserungen
- Schriftart: Fira Code mit aktivierten Ligaturen
- Flüssige Animationen: Cursor und Scrollen
- Automatisches Speichern: Bei Fensterwechsel
- Formatierung beim Speichern: Aktiviert
Git-Integration
- Automatisches Abrufen aktiviert
- Intelligente Commits aktiviert
- GitLens mit experimentellen KI-Funktionen
- Pull-Request-Integration
Thema & Symbole
- Thema: Shades of Purple (Super Dark)
- Symbole: vscode-icons
Sprachspezifische Formatierer
- JavaScript/TypeScript: Integrierter Formatierer
- Python: autopep8
- Markdown: markdownlint
- XML: DotJoshJohnson.xml
- JSON: Integrierter Formatierer
- HTML: Integrierter Formatierer
Datenschutz & Leistung
- Telemetrie deaktiviert
- Automatische Updates deaktiviert
- Cloud-Synchronisierung deaktiviert
- Erweiterungsempfehlungen ignoriert
Die Datei
settings.jsonenthält einen API-Schlüssel (gitCommitSuggestions.openAIKey). Stellen Sie sicher, dass Sie diesen entfernen oder durch Ihren eigenen Schlüssel ersetzen, oder verwenden Sie besser Umgebungsvariablen für sensible Daten.
Bevor Sie diese Einstellungen auf eine neue Installation anwenden, überprüfen Sie jede Einstellung, um sicherzustellen, dass sie zu Ihrem Workflow und Ihren Präferenzen passt. Einige Einstellungen wie Dateipfade müssen möglicherweise an Ihre Umgebung angepasst werden.