VS Code (AKA Visual Studio Code, `vscode`, [VSCodium](https://vscodium.com/)) is an [[MIT License]]d text editor for code developed by [[Microsoft]] written in LANG.
- [Website](https://code.visualstudio.com/) (Visual Studio Code)
- [GitHub](https://github.com/microsoft/vscode) (Visual Studio Code)
- [AlternativeTo](https://alternativeto.net/software/visual-studio-code/about/) (Visual Studio Code)
> Visual Studio Code is a free and extensible code editor for building web, desktop, and mobile applications, using any programming language and framework.
- [Website](https://vscodium.com/) (VSCodium)
- [GitHub](https://github.com/VSCodium/vscodium) (VSCodium)
- [AlternativeTo](https://alternativeto.net/software/vscodium/about/) (VSCodium)
> VSCodium is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code.
# Notability
VS Code is one of the fastest and most usable [[Electron.js]] apps available.
It is a solid editor that I have used for years.
# Philosophy
> [Visual Studio Code](https://code.visualstudio.com) combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.
>
>Visual Studio Code is updated monthly with new features and bug fixes.
>[!NOTE]
> It was never clear to me what Microsoft's plan was for VS Code when it was originally released. Perhaps just to make inroads and build PR with the open source community.
## Slop
Microsoft, unsurprisingly, has forced [[Github Copilot]] into VS Code. It is no longer an extension but baked into the core.
There are a lot of discussions about how to remove it from various forks.
In the months since it was added, MS has force-enabled many [[Generative AI|Slop]] features, including opening a large Copilot chat sidebar when launched. This feature was originally not able to be disabled until complaints.
For me, this is a bridge too far to continue using the official builds - or potentially removing it and all derivatives from my pool of editors entirely.
## Forks
### VSCodium
- [Website](https://vscodium.com/)
- [Source](https://github.com/VSCodium/vscodium/tree/9664f9e77dd7d65b416e3a83ff739738ab0e877e)
> **This is not a fork. This is a repository of scripts to automatically build Microsoft's `vscode` repository into freely-licensed binaries with a community-driven default configuration.**
People are discussing how or if to remove Copilot from it.
Since MS added the disable setting, VSCodium disables all slop features by default.
### MrCode
- https://github.com/zokugun/MrCode
Dev says they will remove Copilot integration when they have time. But there has been no progress on this.
# OS Support
# Features
# History
Prior to VS Code and Microsoft's acquisition of GitHub, GitHub developed the [[Electron.js]]-based [[Atom Editor]]. It was pretty and had good features overall, but was slow, clunky, and buggy.
Upon release VS Code was nearly identical to Atom, but fast and sleek with few issues.
Surprisingly, Atom development continued for years after the release of VS Code, even for 4 years after the Microsoft acquisition.
# Tips
## Column Select
When using `Control` as the multi-cursor modifier, then the way to do column select is `Shift+Ctrl`.
Otherwise `Shift+Alt` then click and drag.
## Disable Intrusive Autocomplete
Disable these two settings:
```
acceptSuggestionOnCommitCharacter
acceptSuggestionOnEnter
```
## Disable Intrusive CSS Popups
Search settings for "CSS Hover" and disable the useless documentation popups. The links to MDN haven't caused me any issues so far.
## Disable Explorer Hijacking Search
Delete or remap `list.find` in Keyboard Shortcuts.
## Develop Syntax Highlighters
- https://dev.to/alexantra/i-built-my-own-vs-code-syntax-highlighter-from-scratch-and-here-s-what-i-learned-1h98
- https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
- https://markdown-all-in-one.github.io/docs/contributing/textmate-language-grammar.html#introduction
- https://macromates.com/manual/en/language_grammars
### Setup
```sh
yarn add yo
yarn add generator-code
yarn add vsce
yarn exec yo .
```
Edit `package.json` and change `dependencies` to `devDependencies` since the above tools aren't needed at runtime.
- Use `F5` to build and run the extension in a devmode window
- Use `Ctrl+r` to reload the devmode window
### Package
```sh
yarn exec vsce package
```
- The `*.vsix` file can be installed from the extensions menu
## Settings File Locations
### For VS Code
| OS | Path |
| ------- | ------------------------------------------------------------ |
| Linux | `$HOME/.config/Code/User/settings.json` |
| macOS | `$HOME/Library/Application\ Support/Code/User/settings.json` |
| Windows | `%APPDATA%\Code\User\settings.json` |
## Extensions File Locations
Bizarrely, extensions aren't stored in any analogous directory.
### For VS Code
| OS | Path |
| ----- | ------------------------------------------ |
| Linux | `$HOME/.vscode/extensions/extensions.json` |
Or `~/.vscode-oss` for some variants.
### Extensions File Location for Codium
| OS | Path |
| ----- | --------------------------------------------------------------------------- |
| Linux | `$HOME/.var/app/com.vscodium.codium/data/codium/extensions/extensions.json` |
## Install Extensions from Commandline
Installing extensions from the command line is surprisingly intuitive.[^1]
```sh
code --install-extension <extension-id>
```
Starting from an existing `extensions.json` it is possible to turn it into a script to install them if the [[JSON]] file is first formatted (one value per line) using [[Ripgrep - Text Search|ripgrep]]:
```sh
rg '"id": "(.+\..+)"' -o -r 'code --install-extension $1 --force' -N extensions.json > extensions.sh
sh extensions.sh
```
## Build an Extension for Local Use
VS Code typically expects that extensions will be downloaded from their server, but if an extension is not available on the registry your version uses or you are working on a new extension then you need to build the package locally.[^2]
```sh
cd extension_dir
npm install
npm exec -- vsce package
```
It can then be installed with `code --install-extension your_extension.vsix`
# Resources
## Extensions
- [[Cursorless]] - voice controlled code editing
## Theme Creator
```cardlink
url: https://marketplace.visualstudio.com/items?itemName=Juxtopposed.realtime-themes
title: "Realtime Themes - Visual Studio Marketplace"
description: "Extension for Visual Studio Code - Code in your own favorite colors."
host: marketplace.visualstudio.com
image: https://Juxtopposed.gallerycdn.vsassets.io/extensions/juxtopposed/realtime-themes/0.0.8/1708630990917/Microsoft.VisualStudio.Services.Icons.Default
```
# References
- https://stackoverflow.com/questions/32911977/prevent-autocomplete-in-visual-studio-code
- https://superuser.com/questions/1748097/vs-code-disable-tree-view-find-explorer-search
[^1]: https://www.geeksforgeeks.org/techtips/install-vs-code-extensions-from-cli/
[^2]: https://stackoverflow.com/a/79675598