1
Fork 0

vscode: add command to create linux config symlinks

This commit is contained in:
Alan Faubert 2019-05-29 21:21:35 -04:00
parent ce18ad6389
commit e9e55d8004
1 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,7 @@ while :; do
ssh- 'SSH' ssh ' Create config symlinks' ssh-win ' Create config symlinks (Windows)' \
dev- 'Development' dev ' Create ~/dev symlink to ..' \
git- 'Git' git ' Create config symlinks' git-win ' Create config symlinks (Windows)' \
code- 'VS Code' code-ext ' Install extensions' code-win ' Create config symlinks (Windows)' \
code- 'VS Code' code-ext ' Install extensions' code-linux ' Create config symlinks (Linux) ' code-win ' Create config symlinks (Windows)' \
wsltty- 'WSLtty' wsltty ' Create config symlinks (Windows)' \
nodejs- 'Node.js' nodejs ' Install' nodejs-pnpm ' Install pnpm' nodejs-npmrc ' Create .npmrc symlink' nodejs-pkg ' Create ../{pkg} symlinks' nodejs-eslint ' Create ../.eslintrc.yaml symlink' nodejs-setcap ' Let non-root bind to privileged ports' nodejs-npmsh ' Set up npm*.sh scripts' \
gcloud- 'Google Cloud SDK' gcloud ' Create config symlinks' \
@ -58,6 +58,14 @@ while :; do
code-ext)
code --install-extension dbaeumer.vscode-eslint --install-extension eamodio.gitlens --install-extension esbenp.prettier-vscode --install-extension pkief.material-icon-theme --install-extension streetsidesoftware.code-spell-checker
;;
code-linux)
mkdir -p ~/.config/Code/User &&
cd ~/.config/Code/User &&
rm -rf keybindings.json &&
ln -s "$ROOT"/vscode/keybindings.json &&
rm -rf settings.json &&
ln -s "$ROOT"/vscode/settings.json
;;
code-win)
(cmd.exe /c del "%APPDATA%\Code\User\keybindings.json" 2\> nul; cmd.exe /c mklink "%APPDATA%\Code\User\keybindings.json" "$ROOTWIN\vscode\keybindings.json") &&
(cmd.exe /c del "%APPDATA%\Code\User\settings.json" 2\> nul; cmd.exe /c mklink "%APPDATA%\Code\User\settings.json" "$ROOTWIN\vscode\settings.json")