Visual Studio Code經常使用設置及快捷鍵

1. Visual Studio Code經常使用設置

{
    // 控制是否顯示 minimap(縮略圖)
    "editor.minimap.enabled": false,

    // 控制折行方式:根據視區寬度折行
    "editor.wordWrap": "on",
}

2. Visual Studio Code快捷鍵

2.1 基礎編輯

快捷鍵 功能
Ctrl + X 剪切行(空選定) Cut line (empty selection)
Ctrl + C 複製行(空選定)Copy line (empty selection)
Alt + / 向上/向下移動行 Move line up/down
Shift + Delete 刪除行 Delete line
Ctrl + / 切換行註釋 Toggle line comment
Shift + Alt + F 格式化文檔 Format document

2.2 查找與替換

快捷鍵 功能
Ctrl + F 查找 Find
Ctrl + H 替換 Replace
F3 / Shift + F3 查找下一個/上一個 Find next/previous

3. Visual Studio Code經常使用插件

插件 用途
Auto Close Tag 自動閉合HTML標籤
Auto Rename Tag 修改HTML標籤時,自動修改匹配的標籤
Path Intellisense 路徑提示
ESLint JavaScript語法檢查
HTML Snippets HTML5標籤提示
HTMLHint HTML格式提示
IntelliSense for CSS class names in HTML HTML中類樣式提示
npm 運行npm命令
Npm Intellisense NPM導入時提示已安裝的模塊

4. Visual Studio Code中使用Git

4.1 設置user.name及user.email

  全局設置:git

git config --global user.name "李兵"
git config --global user.email "libingql@126.com"

  單個項目設置:找到項目目錄的.git文件夾,打開以後找到config文件,在最後加上。npm

[user]
name = 李兵
email = libingql@126.com
相關文章
相關標籤/搜索