VSCode
์ธ๋ก ๋ธ๋ญ ๋ค์ค ์ ํ (์ดํธ์ง)
https://onesixx.com/vim-vscode/
์์์ ์ ์ปค์ ๋๊ณ , Shift+Cmd+Option ํ์ดํ (Shift+Ctrl+Alt ํ์ดํ)
vim์ผ๋,
Visual Block (^+v) ์ผ๋ก ๋ณต์ฌํ ๋ด์ฉ์ yankํํ,
์ํ๋ ๊ณณ์์ paste
ํ๊บผ๋ฒ์ ๋ฐ๊พธ๊ธฐ
https://young-cow.tistory.com/66
์ ํ – Cmd+Shift+L – Cmd+D – ์์
๋ฉํฐ ์ปค์
Alt + Click
์ฌ์ด๋๋ฐ ์์ชฝ์ฌ์ฉ
To display the Secondary side bar, you can:
- Run View: Toggle Secondary Side Bar Visibility (Ctrl+Alt+B).
- Check the View > Appearance > Secondary Side Bar menu item.
๋จ์ถํค
์ด๋ ค ์๋ Visual Studio Code ์ฐฝ ์ฌ์ด๋ฅผ ์ ํ Cmd + `
๋ถํ ํ๋ฉด ์ด๋ Cmd+ ์ซ์ํค ex) 2๋ถํ ์ธ ๊ฒฝ์ฐ Cmd+1 Cmd+2
๊ทธ๋ฅ ํ๋ฉด์ด๋ Ctrl + ์ซ์ํค
๋ชจ๋ ์ค ๋์ ์ผํ๋ฅผ ์๋์ผ๋ก ์ถ๊ฐ
๋ฐ๊พธ๊ธฐ์์ $ => ,

ํจ์ function๊ด๋ จ
ํจ์์ arguemnt ๋ณด๊ธฐ (Quick Info)
IntelliSense ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ ค๋ฉด, ํจ์ ์์ ์ปค์๋ฅผ ๋๊ณ ,
Ctrl + Shift + Space
Cmd + Shift + Space
ํด๋น ํจ์์ ์ ์๋ก ๊ฐ๊ธฐ
F12
๋ง์ฐ์ค์ฐํด๋ฆญ > go to definition
๋ง๋ค๊ธฐ (refactoring)
Ctrl+Shift+R
๋ณ์, ํจ์๋ช ์์ (rename symbol)
F2
save paste ์ formatting์๋์ผ๋ก

How to set environment variables in vscode
Variables Reference
launch.json(๋๋ฒ๊น ํ๊ฒฝ์ค์ ํ์ผ) ๋ง๋ค๊ธฐ
https://velog.io/@markyang92/Python-os
Environment variables#
${env:Name}๋ฅผ ํตํด์ ํ๊ฒฝ๋ณ์๋ฅผ ์ฐธ์กฐํ ์ ์๋ค.
(์๋ฅผ๋ค์ด, ${env:USERNAME}).
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/app.js",
"cwd": "${workspaceFolder}",
"args": ["${env:USERNAME}"]
}Configuration variables#
{config:Name} ๋ฅผ ํตํด์ VS Code settings์ค์ ์ ์ฐธ์กฐํ ์ ์๋ค.
(์๋ฅผ ๋ค์ด, ${config:editor.fontSize}).
pycham
Edit Configurations…> Environmental variables> click> Add or change variables, then click OK
import os print(os.environ['SOME_VAR'])
ํ์ง๋ง, vscode ์ launch.json ํ์ผ์ configuration ์ ๋ค์์ ๋ฃ์ผ๋ฉด ๋ฌธ์ ํด๊ฒฐ๋๋ค.
์ฐธ๊ณ : Debugging configurations for Python apps in Visual Studio Code
json pretty format

์ธ๋ก์ ๋ฃ๊ธฐ



ipython notebook ์๋์คํฌ๋กค ์๋ ๋

Explorer์์ ๋ถํ์ํ ํด๋/ํ์ผ ์จ๊ธฐ๊ธฐ
python์ ๊ฒฝ์ฐ, __pycache__ ํด๋ *.pyc ํ์ผ
Code> Preferences > Settings
Setting.json
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/*.pyc": {"when": "$(basename).py"},
"**/__pycache__":true,
}

Terminal์์ ํ์ผ ์คํ
$ code . some.txt

Vim ํด๋ฆฝ๋ณด๋ ์ฌ์ฉ
*p

์ฐธ๊ณ .
https://code.visualstudio.com/docs/python/python-tutorial/
vsCode ์ค์น
miniConda ์ค์น
ํ๋ก์ ํธ ์ ์ฒด ๋ด์์ ๋ฌธ์์ด ์ฐพ๊ธฐ
Cmd + Shift + F
๊ธ์ํฌ๊ธฐ
- > ctrl + , ํฐํธ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ๊ณ ์ถ๋ค๋ฉด font size ๋ผ๊ณ ์ค์ ์ฐฝ์ ์ ๋ ฅ ํ ๋ค ํฌ๊ธฐ ์กฐ์ ํ๋ค.
- > font size. ๋ง์ฐ์ค ์คํฌ๋กค๋ก ๊ธ์ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ๊ณ ์ถ๋ค๋ฉด …
- > zoom.
2. User > Text Editor > Mouse Wheel Zoom (Unckeck)
window.zoomLevel
editor.fontSize.

Extension
visual studio code remote ssh
์๊ฒฉ์๋ฒ์ ์ ์ํ๋ ๋ฐฉ๋ฒ
Add New SSH Host ์ ํ > ssh ๊ณ์ ๋ช @ip์ฃผ์(๋๋ ๋๋ฉ์ธ) ํ์์ผ๋ก ์ ๋ ฅ> ๋น๋ฐ๋ฒํธ๋ฅผ ์ ๋ ฅ
์๋ ์ ์ ์ค์ (๋น๋ฐ๋ฒํธ ์ ๋ ฅ ์๋ต)
- ๋ก์ปฌ์์ ssh-key ๋ฐ๊ธ
- ๋ฐ๊ธ๋ ssh-keyํ์ผ์ ์๋ฒ์ ๋ฑ๋ก
- config ํ์ผ์์ ํคํ์ผ์ ์ธ์ํ๋๋ก ์ค์
1. ๋ก์ปฌ์์ ssh-key ๋ฐ๊ธ
PowerShell์์
ssh-key๋ฅผ ๋ฐ๊ธ (์ ๋ ฅ๋ถ๋ถ ๋ชจ๋ 3๋ฒ ์ํฐ)
๋ฐ๊ธ๋ฐ์ ssh-key๊ฐ ์๋ ํด๋๋ก ์ด๋
/.sshํด๋์๋ id_rsa(private key) ์ id_rsa.pub(public key)
ํด๋น ๋ด์ฉ copyํด์
myComm C:\\Users\\onesixx $ ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (C:\\Users\\onesixx/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\\Users\\onesixx/.ssh/id_rsa. Your public key has been saved in C:\\Users\\onesixx/.ssh/id_rsa.pub. The key fingerprint is: SHA256:y49WxhiGzPdJxxxxxxxxxxxxxxxxWFWDyEUZssU mycomm\\onesixx@SKCC21N00559 The key's randomart image is: +---[RSA 4096]----+ | ..=BO@%| | o*EB*X| | o . + o++.| | + + . +oo | | oS* o.o | | ...* | | oo | | .o | | .. . | +----[SHA256]-----+ ' $ cd Users\\onesixx $ vi .\\.ssh\\id_rsa.pub

2. ๋ฐ๊ธ๋ ssh-keyํ์ผ์ ์๋ฒ์ ๋ฑ๋ก
way1>์๊ฒฉ์๋ฒ๋ก ํ์ผ์ copyํํ paste
ํ์ผ์ add, overwrite (not replace)
$ scp -P 9001 ./.ssh/id_rsa.pub [email protected]:my_id_rsa.pub $ cat my_id_rsa.pub >> .ssh/authorized_keys
way2>์๊ฒฉ์๋ฒ์ .ssh/authorized_keys ํ์ผ์ pasteํ๋ค.

3. config ํ์ผ์์ ํคํ์ผ์ ์ธ์ํ๋๋ก ์ค์
๋ค์ ๋ก์ปฌ ํ๊ฒฝ(์๊ฒฉ ์๋ฒ๊ฐ ์๋)์์ vscode๋ฅผ ์คํ์ํจ๋ค.
F1
Remote-SSH: Connect to Hostโฆ
Configure SSH Hostsโฆ๋ฅผ ์คํ
D:\Users\sixx\.ssh ํด๋์ config ํ์ผ์ ํด๋ฆญ
Config ํ์ผ์๋ ์์ ์ด ์ฐ๊ฒฐํ ์ ์ด ์๋ ์๋ฒ๋ค์ ๋ํ ์ ๋ณด๊ฐ ์
๋ ฅ๋์ด์๋๋ฐ,
์์ ์ด key๋ฅผ ์ธ์ํ๊ณ ์ ํ๋ ์๋ฒ ์ ๋ณด ์๋์ IdentityFile ~/.ssh/id_rsa๋ฅผ ์ถ๊ฐ
(ํ์๋ ์ด๋ฏธ ๋ชจ๋ ์๋ฒ์ key๋ฑ๋ก์ ํด ๋ ์ํ๋ผ ์ ์ฌ์ง์์ IdentityFile์ด ์
๋ ฅ๋์ด์ ธ ์๋ ๊ฒ์)
ForwardAgent yes

๋ก์ปฌ์ ์ ์ฅ๋ id_rsa ํ์ผ์ ์ธ์ํด,
์๋ฒ์ ๋ฑ๋ก๋ key ์ ๋ณด์ ๊ฐ์ผ๋ฉด ๋น๋ฐ๋ฒํธ ์์ด ํด๋น ์๋ฒ์ ์ ์ ํ ์ ์๋ ์๋ฆฌ
python ์ค์น
Extensions section. ( โงโX )
“python” extension ์ค์น & restart

Monokai pro
Python
pylance
python Extended
python type hint
Jupyter
docker
Remote – Container, SSH, …
Anaconda ํ๊ฒฝ ์๋ ์ฐ๊ฒฐ
command pallet (Cmd+Shift+P )

Preference> Setting > Workspace

์ notebook ํ์ผ
- Cmd+Shift+P ( View > Command Palette (โงโP))
- Python: Create Blank New Jupyter Notebook

ํ ๋ง ์ค์ ๋ฐ ์ผ๋ถ ์์ ๋ณ๊ฒฝ
Monikai ํ ๋ง ๋ฐฐ๊ฒฝ์
๊ธฐ์กดํ ๋ง ์์ ๋ณ๊ฒฝ
Code > Setting > Settings…
Workbench> Appearance> Edit in setttings.json

"workbench.colorTheme": "Monokai",
"workbench.colorCustomizations": {
\t"tab.activeBackground": "#6A5ACD",
\t"activityBar.activeBackground": "#6A5ACD",
\t"panelTitle.activeBorder": "#6A5ACD",
//"statusBarItem.activeBackground": "#6A5ACD",
//"toolbar.activeBackground": "#6A5ACD"
}
font
D2Coding ์์ฒด ์ค์น
https://github.com/naver/d2codingfont/releases ์์ code(D2Coding-Ver1.3.2-20180524.zip)๋ฅผ ๋ค์ด๋ฐ์,
์์ถํด์ ํ, D2 CodinAllํด๋์ D2Coding-Ver1.3.2-20180524-all.ttc ๋ฅผ ๋๋ธํด๋ฆญํ์ฌ ์ด๊ณ ,
Install Font ๋ฒํผ ํด๋ฆญ
์ ์ฉ
vscode์์ code > Preferences > Settings ์์
Text Editor > Font > Font Family์ ๋ด์ฉ์
Menlo, Monaco, ‘Courier New’, monospace -> D2Coding ์ผ๋ก ๋ณ๊ฒฝ
๋๋
Font Ligatures์์ Edit in setting.json์ ํด๋ฆญํ์ฌ ์ง์ ์์
"editor.fontFamily": "D2Coding, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": null
//D2Coding
"editor.fontFamily": "D2Coding",
"editor.fontLigatures": true
ํด๋๊ตฌ์กฐ๋ณด๊ธฐ


Extension ์คํ๋ผ์ธ ์ค์น
https://haenny.tistory.com/329#
1. vsix ๋ค์ด๋ก๋
vscode marketplace ์ ์ (Visual Studio Code ํญ)
์ํ๋ Extention์ ์์ธํ์ด์ง์์, ์ฐ์ธก์ Download Extension์ ํด๋ฆญ
visx ํ์ผ์ด ๋ค์ด๋ก๋
2. VSCode ํ์ฅ ํ๋ก๊ทธ๋จ ์ค์น
Command Pallete… ํด๋ฆญ (Ctrl + Shift + P) ์์ Install from vix
- ์ข์ธก ํ๋จ โ ์ค์ (ํฑ๋๋ฐํด ์์ด์ฝ) ํด๋ฆญ
- Command Pallete… ํด๋ฆญ (Ctrl + Shift + P)
- ‘Install from VSIX’ ๊ฒ์ ํ ํด๋ฆญ
- ์ํ๋ vsix ํ์ผ (ํ์ฅ ํ๋ก๊ทธ๋จ ์ค์น ํ์ผ) ์ ํ
Extension
Teminal zoom
Monokai pro
Remote-ssh
Vim
Indent-Rainbow