or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Visual Studio Code 基本介紹
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →基本資料
快速鍵對應(key map)
外觀總攬(主題、設定等)
ctrl + shift + e
)ctrl + shift + f
)ctrl + shift + g
)ctrl + shift + x
)ctrl + shift + d
)ctrl + shift + p
/F1
)ctrl + ‵
)F1, display language
)主題
一個好的主題主題看起來賞心悅目,也有它的實用角度(何者在投影下顯示得更清楚)。
內建推薦:
主題套件推薦:
BONUS
字型
字型首要考量的是易於辨識、當然如果有一些特殊才藝會更好。
Fira Code 取自 Firefox OS 字型經過改造,更適合用於程式設計開發,具有好辨識、等寬、連字等效果。
VSCode 非常聰明,它會自動 fallback 無法顯示的字型,中文的部分可以設定 fallback。
編輯器
編輯器(Editor)是 VSCode 裡面最要內容區,也是寫程式的地方。天天面對的地方一定要調好調順。
內建設定
套件補完
在編輯器之間切換
ctrl + [1-9]
alt + [1-9]
ctrl + tab
alt + ←→
emmet
emmet 已經成為 HTML 程式設計的一個基本工具和技能。
排版
排版工具可以讓程式碼的編排更一致,減少人為排版的工作。
BONUS 快速鍵
alt + shift + o
:移除未使用的匯入alt + shift + f
:排版常用快速操作方式(快速鍵)
VSCode 提供互動式試用體驗(
alt + h, i, enter
)。註解
ctrl + /
alt + shift + a
多重游標操作
ctrl + alt ↑↓
alt + click
alt + shift + drag
內容異動
alt + shift + ↑↓
ctrl + drag
ctrl + shift + k
alt + ↑↓
選取
ctrl + d
ctrl + F2
shift + alt + →
檔案格式或編碼
ctrl + K, m
IDE 體驗
VSCode 可以有近乎 IDE 等級的體驗,一堆重構神器,用過之後就回不去了。
VSCode 提供互動式試用體驗(
alt + h, i, enter
)。Codelens 程式碼追蹤
重新命名符號(Rename)
F2
移至定義及預覽定義
ctrl + click
F12
ctrl + hover
alt + F12
提示:重構、快速修復
JS as TS
轉寫 JS 卻可以得到 TS 的 typing 和 type checking 體驗。
檔案總管
快速建立檔案 / 資料夾
ctrl + shift + e
跳到檔案總管ctrl + alt + a
建立檔案ctrl + shift + alt + a
建立資料夾搜尋
ctrl + f
esc
alt + enter
Git
VSCode 整合了圖形化介面的 Git ,讓開發者幾乎可以在不需要用命令列的方式完成大部分 Git 操作。
內建設定
Git 套件
.gitignore
- .gitignore Generator其他
ctrl + shift + p / F1
),幾乎所有 Git 命令都可以透過,包含像git commit --amend
。整合終端機
VSCode 整合了終端機,不需要離開 VSCode 的情況下就可以下指令。整合終端機還是自訂要使用哪個 shell ,一切都這麼美好。
終端機設定
以 Windows 為例,改成 bash
%HOME%
設定好 .bashrc 和 .bash_profile快速鍵
終端機是開發時非常容易切換焦點的地方,熟記快速鍵是必要的技能。
ctrl + ‵
ctrl + shift + ‵
ctrl + shift + c
ctrl + \
alt + ↑↓←→
建議自訂聚焦終端機快速鍵,這樣可以跟編輯器來回切換
ctrl [1-9]
alt + ‵
延伸套件
檢查 / 格式化
體驗提升
HTML / CSS
JS / TS
Angular
其他