# VSCode (editor) đ
Open source (Micro$oft) atlernative to sublimet-text. - VSCode / r/vscode
Frankly I find it complete nonsense to be using an editor in a web browser on an interpreted language, but you know what? People said the same of emacs in the â80s and â90s⊠- Making Emacs popular again
VS Code - Whatâs the deal with the telemetry? / HN
VSCodeâs SSH agent is bananas - Unlike Tramp, which lives off the land on the remote connection, VSCode mounts a full-scale invasion: it runs a Bash snippet stager that downloads an agent, including a binary installation of Node.
# â ïž powning VSCode â ïž
- I Almost Got Hacked in a Job Interview - througg .vscode/package.json
Thatâs the reason you have to trust the repo => remove .vscode folder
Stealth measures layered on top
- .vscode/settings.json:7 â â**/.vscodeâ: true in files.exclude hides .vscode/ from VS Codeâs own file explorer. Victim never sees tasks.json while browsing the project.
- .vscode/tasks.json â fake âWelcome to Node.js v24.11.0â REPL banner as decoy output.
- AUTH_API in .env is base64-encoded to evade casual string search; the real attacker URL is also hardcoded inline in socket/index.js:73 for redundancy.
- server.js:39-45 â process.on(âuncaughtExceptionâ) and unhandledRejection silently swallow all errors.
- async without await neutralizes the nominal âverificationâ guard.
# VSCodium âźș
Project exists so that you donât have to download+build from source. This project includes special build scripts that clone Microsoftâs vscode repo, run the build commands, and upload the resulting binaries for you to GitHub releases. These binaries are licensed under the MIT license.
- Telemetry is disabled. - VSCodium
Install as .deb so update are managed by your system. congifure depot
$ sudo apt update && sudo apt install codium$ codium --extensions-dir ~/.vscode/extensions# Code-Server âźș
Run VS Code on any machine anywhere and access it in the browser.
Note: this is not the same thing as Visual Studio Code Server, which has some licensing restriction like âhosting it as a service is not allowedâ
Some restriction apply:
- note alls extension are working
- Cline does not work => use the cli instead.
# Nix/apt
This allows seamless integration with host: it share direct filesystem and tools in terminal like ninja/gcc, no need to customize the docker image.
$ nix profile add nixpkgs#code-server # Maybe old
# pick latest on github https://github.com/coder/code-server/releases
$ wget https://github.com/coder/code-server/releases/download/vX.X.X/code-server_X.X.X_amd64.deb
$ sudo apt install ./code-server_X.X.X_amd64.deb
$ code-server \ # default to 127.0.0.1:8080
--extensions-dir /home/yves/.vscode/extensionsRunning it as a systemd service
# /etc/systemd/system/code-server.service
[Unit]
Description=code-server
After=network.target
[Service]
Type=simple
User=yves
ExecStart=/usr/bin/code-server \ # default to 127.0.0.1:8080
--extensions-dir /home/yves/.vscode/extensions
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetTo activate
$ sudo systemctl enable code-server
$ sudo systemctl start code-server
#
$ journalctl -u code-server -f# Podman
Usuall pod restrictions applyâŠ
$ podman pull ghcr.io/coder/code-server:latest
# start server with local socket only
$ podman run -d \
--replace \
--name code-server \
-v ~/DEV:/home/coder/project \
-p 127.0.0.1:8080:8080 \
-e PASSWORD="yourpassword" \
ghcr.io/coder/code-server:latest # SSH tunnel
This is the simplest way to securize access (auth+encryption)
# create ssh tunnel client <-> codeserver
$ ssh -N -L 8080:127.0.0.1:8080 yves-lab
# open browser on client at http://localhost:8080see also
# Feature
- Code Outline
- Code snippet allows to automate code generation. For eg generating lua class for pico8.
- Extentions
- profile - tailor specific usage (theme, font size, extensions, settings, keybindings,etcâŠ)
â : extension exist both in codium registry and vscode registry
# Customization
Synchronising Settings
- using your own github gist
- using microsoft / github account
# Useful extensions
- Peacock â - identify instance of vscode/project with unique color
- Back & Forth â - buttons for easier navigation through recent edit locations and opened files.
- EasyZoom - zoom with Ctrl-+/- or moose wheel
- â Fast Unicode Math CharactersÂČ / github
-
Setting Cycler - add easy way to toggle commands.
- Toggle Column Selection - switch selection from normal/column mode -
Alt/Shift I
# Code Annotation âźș
- Todo Tree - searches for comment tags like TODO and FIXME - require ripgrep
- Bookmarks - Mark/unmark positions in your code
# Others
-
ANSI Colors - display a file with ANSI color escape sequences
- Asciiflow2 - draw ascii diagram
- org-mode - from Emacs a mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more
- Graphviz - graph visualization
- Cursorless - a plugin that integrates with voice control software to let you do AST level code editing with your voice.
# Markdown
# Dev
- Native Debug - integrated debugger
# Code Runner âźș
Runs selected code snippets per click or keyboard shortcut.
- if cusomizing command make sure they are compatible with your current shell
- by default has its own telemetry on
Settings - make sure to enable these
- save all files before running
- Run In Terminal
- Clear Previous Output
- File Directory As Cwd - may/not be depending on your use
# C++ âźș
- clangd - Provides C/C++ language IDE features for VS Code using clangd:
- code completion
- compile errors and warnings
- go-to-definition and cross references
- include management
- code formatting
- simple refactorings
- C++ TestMate - run unit Test inside VSCode
- Disassembly Explorer - an alternative to Compiler explorer
# Crystal âźș
# Python âźș
# shader
- Shader toy Show GLSL Previewâ command.
- glsl-canvas
# Tips & Tricks âźș
# Remote
Run inside chrome and work over ssh.
If you have Chrome installed, it opens the browser in app mode. That means thereâs no keybind conflicts, address bar, or indication that youâre coding within a browser. It feels just like native VS Code.
prefer coder/code-server
Otherwise continue below
# VS Code Remote âźș
- work over ssh
- on container
- on WSL (windows)
does not work with fish as default user shell => will cause a Timeout on VSCode client (though ssh work perfectly).
# Run over ssh âźș
By default, sshcode will rsync your local VS Code settings and extensions to the remote server every time you connect.
#You can specify a remote directory as the second argument
go/bin/sshcode kyle@dev.kwc.io ~/projects/sourcegraph# Autocolor by Host âźș
Using Peacock - it must be installed on both local and remote server (?). - doc
# Troubleshooting
- Github copilot extension - is doing rigrep => this can saturate cpu when opening home folder in remote. => disabling copilot extension solve it
# Install
# Theia âźș
Runs VS Code Extensions