A VS Code extensions manifest (#snippet)

Today I read a post about Matthias Ott’s VS Code setup. I love these posts because you can always discover new things.
After I finished reading it, it tweeted it and shared that you can also handle your VSCode extension setup via yo…

Today I read a post about Matthias Ott’s VS Code setup. I love these posts because you can always discover new things.

After I finished reading it, it tweeted it and shared that you can also handle your VSCode extension setup via your terminal.

code --install-extension extensionAuthor.extensionName

So far, I’ve been maintaining a script in my dotfiles to manage my extensions. Meaning, whenever I added a new extension, I had to update this script manually. @shdli answered me with a way nicer approach. He called it a "manifest’y approach". ?

# backing up VS Code extensions
code --list-extensions > "./visual-studio-code-extensions.txt"

# installing VS Code extensions
cat  "./visual-studio-code-extensions.txt" | xargs -L 1 code --install-extension

Using code --list-extensions I can install my extensions via VS Code and then generate the extension listing which will be re-used to install them. That’s very sweet!

This new approach immediately led to me introducing commands like install and backup in my dotfiles. ?



Reply to Stefan


Print Share Comment Cite Upload Translate
APA
Stefan Judis | Sciencx (2024-03-28T12:42:33+00:00) » A VS Code extensions manifest (#snippet). Retrieved from https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/.
MLA
" » A VS Code extensions manifest (#snippet)." Stefan Judis | Sciencx - Wednesday March 18, 2020, https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/
HARVARD
Stefan Judis | Sciencx Wednesday March 18, 2020 » A VS Code extensions manifest (#snippet)., viewed 2024-03-28T12:42:33+00:00,<https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/>
VANCOUVER
Stefan Judis | Sciencx - » A VS Code extensions manifest (#snippet). [Internet]. [Accessed 2024-03-28T12:42:33+00:00]. Available from: https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/
CHICAGO
" » A VS Code extensions manifest (#snippet)." Stefan Judis | Sciencx - Accessed 2024-03-28T12:42:33+00:00. https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/
IEEE
" » A VS Code extensions manifest (#snippet)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/. [Accessed: 2024-03-28T12:42:33+00:00]
rf:citation
» A VS Code extensions manifest (#snippet) | Stefan Judis | Sciencx | https://www.scien.cx/2020/03/18/a-vs-code-extensions-manifest-snippet/ | 2024-03-28T12:42:33+00:00
https://github.com/addpipe/simple-recorderjs-demo