🔥 Sick ass IDE makes sick ass codes. ver 1.33.1 🔥

Why I switch to VScode?

Mostly because of Python programming. Sublime has Python REPL, but it is quite slow and apt to crash when executing big programs. In VScode, it has built-in terminal and is stable and fast. Plus, the Jupyter extension is awesome (tho not as good as Jupyter Notebook). Last but not least, I care about the UI very much. I rock with cool theme and change them frequently, VScode also got it covered.

Table of Contents

Basic Things

Extensions

One of the features of VScode -- a wide variety of extensions, which makes the programming process efficient and satisfying.
Easy to browse and install, click the Extensions on the left side.

Open Settings

Left click the bottom left GEAR icon, find Settings.


Hot Keybind

  • Close Open Folder: press ctrl+k then press f
  • Save File: ctrl+s
  • Fontsize Up/Down: ctrl + "numberpad +" / ctrl + "numberpad -"
  • Toggle Sidebar: ctrl+b
  • Open Terminal: ctrl+
  • Run codes: F5

Setting Environment Path

  1. Go to 桌面.

  2. Right click 我的電腦, select 內容.

  3. Click 進階系統設定 on the left, and select 環境變數 in the new window.

  4. Find PATH in 使用者變數(upper section), and edit.

  5. Click 確定 all the way out.

Themes and Icons

Left click the bottom left GEAR icon, find Color Theme to customize themes/icons.

Use arrow keys to preview changed theme.

file-icons

file-icons is an extension which provides a lot of qute icons.

Monokai

One of the default theme, which is the theme in all example pictures. Also, it is the default theme in Sublime Text 3.

Execution

Code Runner

Code Runner enables you to run various of codes, Python, C/C++ are included. But need to set up compiler or interpreter beforehand.
press ctrl+alt+n or right click and select "run code" to execute. Also support block execution in Python.

Python

Jupyter

Jupyter is a sick extension in vscode. But in the this version, the feature has been integrated in the Python extension, so you don't need to download Jupyter.
It allows you to create cells just like Jupyter Notebook by typing the keyword "#%%" in a line. You can also right click and select "Run Current File in Python Interactive Window".

Python

Python is a integrated extension containing linting(語法/排版錯誤提示), Code formatting(自動排版), intellisense(智慧填字), etc.

Linting recommend: flake8

flake8 is quite strict with the coding style, such as space between operators and operants, docstrings are required in every functions, unused variables, etc...

  1. type "pip install flake8" in terminal.
  2. modify user setting(',' might required).

enables flake8.

"python.linting.flake8Enabled": true

ignores certain warning. Error codes can be found in 問題 (buttom left).

"python.linting.flake8Args": [
        "--ignore=E226"
    ]

Code formatting recommend: autopep8

  1. type "pip install autopep8" in terminal.
  2. modify user setting(',' might required).

choose formatting package.

"python.formatting.autopep8Path": "autopep8"

auto format every you save

"editor.formatOnSave": true

VS Code Jupyter Notebook Previewer

VS Code Jupyter Notebook Previewer let you preview .ipynb so you don't need to open jupyter notebook. But only preview, cannot execute,

press "show preview" on the upper right side.

C++

Under construction 🔨

Processing

Processing is a java-based language. Using processing can easily accomplish some visual effects or physical simulation. But it isn't supported by Code Runner by default. We need to set up the processing-java in environment path first.

Find the path of processing-3.3.7 folder, mine is D:\processing-3.3.7\.
Add it to the PATH.

  • Let Code Runner recognize .pde(processing extension).

Add the code below to the user setting.

"code-runner.executorMapByFileExtension": {
    ".pde": "processing-java --sketch=$dir --output=$dir/output --force --run"
},