Update: December 2023
You can now use Open VS Code (Code OSS) without extra installation as Google Cloud Shell Editor. Theia is currently still available as a legacy editor.
An extra installation and this project are therefore no longer necessary.
Install and start OpenVSCode Server in Google Cloud Shell.
Google Cloud Shell is available at no additional cost (free) for Google Cloud customers and you get 5 GB of persistent storage.
Start Google Cloud Shell:
Download code.sh
script:
curl -O "https://raw.githubusercontent.com/Cyclenerd/google-cloud-shell-vscode/master/code.sh"
Install latest OpenVSCode Server:
bash code.sh install
Start OpenVSCode Server:
bash code.sh
Open web preview URL:
Your user settings are stored in the browser's local cache. If you use another browser and if the preview URL changes, your settings are gone. Unfortunately, the preview URL changes over time. It is therefore strongly recommended to make the settings in the remote area.
Open Settings (Ctrl + ,) and click on Remote...
:
My settings:
{
"editor.minimap.enabled": false,
"editor.renderWhitespace": "all",
"editor.renderControlCharacters": true,
"editor.fontSize": 14,
"editor.fontFamily": "'Source Code Pro Medium', 'Source Code Pro', Monaco, 'Courier New', monospace",
"workbench.colorTheme": "Dracula",
"editor.acceptSuggestionOnEnter": "smart",
"workbench.startupEditor": "newUntitledFile",
"files.eol": "\n",
"git.enableSmartCommit": true,
"terminal.integrated.defaultProfile.linux": "tmux",
"extensions.ignoreRecommendations": true,
"git.ignoreMissingGitWarning": true,
"workbench.editor.enablePreview": false,
"problems.decorations.enabled": false,
"html.autoClosingTags": false,
"diffEditor.ignoreTrimWhitespace": false
}
The remote OpenVSCode Server settings are located in the remote file system in the Cloud Shell under:
jq < $HOME/.openvscode-server/data/Machine/settings.json
Add code.sh
to your Bash aliases with absolute pathnames. You can then execute code
anywhere.
Alias (~/.bash_aliases):
echo "alias code='bash `pwd`/code.sh'" >> ~/.bash_aliases && bash
Help:
bash code.sh help
Usage: code.sh [COMMAND]
COMMAND is one of the following:
install - install latest OpenVSCode Server
upgrade - alias for install
start - start OpenVSCode Server (127.0.0.1:8080)
remove - remove OpenVSCode Server
help - displays help (this message)
Why..? You may ask..: "For me, the standard looks exactly the same, doesn't it?"
The default editor is Theia, and it's definitely an excellent product.
GitPod writes about this topic in their blog:
To convince developers to say goodbye to local development, it is important to not reinvent the wheel but offer an editing experience that:
- Is backed by a thriving community
- Wins hearts and minds of developers
- Works on modern web technology
This is VS Code.
My developer heart is set on VS Code 🧑💻💘. I don't want to miss the marketplace and the VS Code extensions. I also like the 160px more vertical space for the source code.
If you feel the same way, this project with the script will help you. If you get along with Theia, also good. This is diversity.
If you rely on Cloud Code, please support this issue. Google unfortunately does not publish to the vendor neutral, Open Source marketplace for VS Code Open VSX.
Have a patch that will benefit this project? Awesome! Follow these steps to have it accepted.
- Please read how to contribute.
- Fork this Git repository and make your changes.
- Create a Pull Request.
- Incorporate review feedback to your changes.
- Accepted!
All files in this repository are under the Apache License, Version 2.0 unless noted otherwise.