2 commands you should know if you use VSCode

0xkoji - Oct 19 '22 - - Dev Community

I think many of you are using vscode. Of course, I'm also using it everyday to write code and read code.

Recently I needed to reformat a Mac that I use for work.

As many of you know, setting up a Mac is troublesome.

But we can automate that process easily with ansible.

I was wondering that I could include vscode extensions in that automation process?

The answer was Yes 🎉🎉🎉

We can use code command to install extensions.

To be honest, I didn't know about that until quite recently lol.

In this post, I will introduce 2 commands to you!

1 code --install-extension

This command can install an extension.

$ code --install-extension vscode-icons-team.vscode-icons
Enter fullscreen mode Exit fullscreen mode

2 code --list-extensions

This command shows you the list of extensions you installed.
If you use this command with |

$ code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension aaron-bond.better-comments
code --install-extension astro-build.astro-vscode
code --install-extension bradlc.vscode-tailwindcss
code --install-extension capaj.vscode-exports-autocomplete
code --install-extension ccimage.jsonviewer
code --install-extension Dart-Code.dart-code
code --install-extension Dart-Code.flutter
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension esbenp.prettier-vscode
code --install-extension formulahendry.auto-close-tag
code --install-extension foxundermoon.next-js
code --install-extension GitHub.copilot
code --install-extension GraphQL.vscode-graphql
code --install-extension GraphQL.vscode-graphql-syntax
code --install-extension ionutvmi.path-autocomplete
code --install-extension jpoissonnier.vscode-styled-components
code --install-extension JuanBlanco.solidity
code --install-extension kamikillerto.vscode-colorize
code --install-extension lacroixdavid1.vscode-format-context-menu
code --install-extension mikestead.dotenv
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-python.python
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.cpptools-themes
code --install-extension oderwat.indent-rainbow
code --install-extension shardulm94.trailing-spaces
code --install-extension slevesque.shader
code --install-extension Souche.vscode-mindmap
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension TaiyoFujii.novel-writer
code --install-extension twxs.cmake
code --install-extension usernamehw.errorlens
code --install-extension vscode-icons-team.vscode-icons
code --install-extension wix.vscode-import-cost
code --install-extension wwm.better-align
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .