Visual Studio Code & Jupyter - Louis-udm/Blog GitHub Wiki
VS Code + jupyter
Louis
01 jan. 2018
raccourci
shortcuts for mac os shortcuts frequent vs code shortcuts for mac os
installer des plugins:
- Python (microsoft)
- Jupyter (Don Jayamanne)
- Code Outline (Patryk Zawadzki)
- One Dark Pro
- vscode-fileheader, utilise: ctrl+opt+i. altinative: topper
- Bracket Pair Colorizer
- markdownlint
- markdown pdf
- markdown preview, utilise: cmd+k v
- git history
- latex Workshop, cmd+shift+p -> latex workshop view latex in new tab
command:
- cmd+shift+p, >python: select interpreter #choisir version de python
- cmd+shift+O #tout les symbols
- ctrl+cliquer function/variable/symboles
- rename symbole: sur le symbole, F2
- debug: cliquer la gauche du numero de ligne.
- cacher le menu: view->changer le menu, pour re afficher: alt
- column selection: opt+鼠标点选; opt+shift+鼠标点选或拖动; cmd+opt+上下键,然后shift+左右
- opt+上下: 交换行
jupyter dans VS Code:
- installer la plugin Jupyter de Don Jayamanne
- If you want to run cell with Ctrl+Enter, add those code in keybindings.json. menu->code->preference->raccoucis, add:
{ "key": "ctrl+enter", "command": "jupyter.execCurrentCell",
"when": "editorTextFocus"
}
-
demarrer jupyter notebook dans terminal
-
connecter jupyter server: cmd+shift+p, >Jupyter: Enter the url of local/remote Jupyter Notebook, enter the token.
-
new py file, enter:
#%%
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
x = np.linspace(0, 20, 100)
plt.plot(x, np.sin(x))
plt.show()
- cliquer "Run Cell"
topper
menu->code->preference->raccoucis, add: { "key": "ctrl+alt+i", "command": "extension.addTopHeader", "when": "editorTextFocus"}
reference:
test LaTex in mac: $$f(z)=\int_{i=1}^{100} \frac{x^2}{y} $$