Điều hướng
Điều hướng file & symbol
Ctrl+PMở nhanh theo tên file
Ctrl+Shift+PCommand Palette
Ctrl+Shift+OĐi tới symbol trong file
Ctrl+TĐi tới symbol trong workspace
Ctrl+GĐi tới số dòng
F12Đi tới định nghĩa
Alt+F12Xem trước định nghĩa
Shift+F12Tìm tất cả tham chiếu
Ctrl+Shift+\Đi tới dấu ngoặc tương ứng
Điều hướng tab & editor
Ctrl+TabChuyển qua các tab đang mở
Ctrl+1 / 2 / 3Focus vào nhóm editor 1 / 2 / 3
Ctrl+\Chia đôi editor
Ctrl+BBật/tắt sidebar
Ctrl+JBật/tắt panel phía dưới
Chỉnh sửa
Thao tác dòng
Ctrl+Shift+KXóa toàn bộ dòng
Alt+Up / DownDi chuyển dòng lên / xuống
Shift+Alt+Up / DownSao chép dòng lên / xuống
Ctrl+EnterChèn dòng bên dưới
Ctrl+Shift+EnterChèn dòng bên trên
Ctrl+Shift+[Gấp vùng
Ctrl+Shift+]Mở vùng
Thao tác văn bản
Ctrl+DChọn từ (lặp để thêm kết quả tiếp)
Ctrl+Shift+LChọn tất cả các lần xuất hiện
Ctrl+LChọn toàn bộ dòng
Ctrl+/Bật/tắt comment dòng
Shift+Alt+ABật/tắt block comment
Tab / Shift+TabThụt lề / bỏ thụt lề
Multi-Cursor
Thêm cursors
Alt+ClickThêm cursor tại vị trí click
Ctrl+Alt+Up / DownThêm cursor phía trên / dưới
Ctrl+DThêm lần xuất hiện tiếp của selection
Ctrl+Shift+LThêm cursor vào tất cả lần xuất hiện
Ctrl+UHoàn tác thêm cursor gần nhất
EscThoát chế độ multi-cursor
Quy trình Multi-Cursor
// Select a word, then Ctrl+D to add matches // Type replacement — all cursors update // Ctrl+Shift+L selects ALL matches at once // Alt+Click for arbitrary cursor placement
Terminal
Phím tắt Terminal
Ctrl+`Bật/tắt terminal tích hợp
Ctrl+Shift+`Tạo terminal mới
Ctrl+Shift+5Chia đôi terminal
Ctrl+PgUp / PgDnCuộn terminal lên / xuống
Ctrl+Shift+CSao chép selection trong terminal
Ctrl+Shift+VDán vào terminal
Quản lý Terminal
Ctrl+Shift+P → Terminal: KillKết thúc terminal đang hoạt động
Ctrl+Shift+P → Terminal: RenameĐổi tên tab terminal
Terminal dropdownChuyển đổi giữa các terminals
terminal.integrated.shell.*Cài đặt shell mặc định
Debug
Điều khiển Debug
F5Bắt đầu / tiếp tục debug
Shift+F5Dừng debug
Ctrl+Shift+F5Khởi động lại debug
F9Bật/tắt breakpoint
F10Step over
F11Step into
Shift+F11Step out
Ví dụ launch.json
{ "type": "node", "request": "launch", "name": "Run App", "program": "${workspaceFolder}/app.js" }
Tính năng Debug
Watch panelTheo dõi biểu thức khi debug
Call StackXem call stack thực thi
Debug ConsoleĐánh giá biểu thức tại breakpoint
Conditional breakpointClick phải breakpoint → chỉnh điều kiện
LogpointGhi log mà không dừng thực thi
Extensions
Quản lý Extensions
Ctrl+Shift+XMở view Extensions
@installedLọc extensions đã cài
@enabled / @disabledLọc theo đã bật / tắt
@recommendedHiển thị extensions được gợi ý
Extensions thiết yếu
PrettierFormatter code (JS, TS, CSS, HTML)
ESLintLinting JavaScript/TypeScript
GitLensTích hợp Git nâng cao và blame
Remote - SSHPhát triển trên máy từ xa qua SSH
Live ServerServer phát triển local với live reload
Thunder ClientREST API client trong VS Code
Cài đặt
Truy cập cài đặt
Ctrl+,Mở UI cài đặt
Ctrl+Shift+P → settings.jsonMở JSON cài đặt
Cài đặt thông dụng (JSON)
{ "editor.fontSize": 14, "editor.tabSize": 2, "editor.formatOnSave": true, "editor.wordWrap": "on", "files.autoSave": "afterDelay" }
Workspace vs User
User settingsToàn cục, áp dụng cho mọi project
Workspace settingsTheo project, lưu trong .vscode/settings.json
Workspace overrides UserCài đặt workspace được ưu tiên
Phím tắt bàn phím
Tùy chỉnh
Ctrl+K Ctrl+SMở editor phím tắt
keybindings.jsonFile JSON cho bindings tùy chỉnh
Phím tắt thiết yếu
Ctrl+Shift+PCommand Palette (truy cập mọi thứ)
Ctrl+PMở nhanh file
Ctrl+Shift+FTìm kiếm trong tất cả file
Ctrl+HTìm & thay thế trong file
Ctrl+Shift+HTìm & thay thế trong toàn bộ file
F2Đổi tên symbol
Ctrl+.Quick Fix (Code Action)
Ctrl+SpaceKích hoạt IntelliSense
Ctrl+Shift+IĐịnh dạng tài liệu
Tích hợp Git
View Source Control
Ctrl+Shift+GMở panel Source Control
+Stage thay đổi (trong SCM view)
-Unstage thay đổi
Ctrl+EnterCommit các thay đổi đã stage
...Thêm thao tác (push, pull, v.v.)
Tính năng Git inline
Gutter indicatorsChỉ báo xanh/xanh lam/đỏ cho thêm/sửa/xóa
Ctrl+Shift+P → Git: CheckoutChuyển nhánh
Ctrl+Shift+P → Git: PullPull từ remote
Ctrl+Shift+P → Git: PushPush lên remote
Click gutter changeXem inline diff của dòng đã sửa
Diff & Merge
SCM → Open ChangesXem diff song song
Inline diff arrowsHoàn tác từng thay đổi riêng lẻ
3-way merge editorGiải quyết conflicts trực quan (1.69+)
Các mẫu thường dùng
Tính năng Workspace
Ctrl+Shift+EFocus vào File Explorer
Ctrl+Shift+DFocus vào view Debug
Ctrl+Shift+MHiển thị panel Problems
Ctrl+K Ctrl+TThay đổi Color Theme
Ctrl+K ZVào Zen Mode
Snippets
// File → Preferences → Configure Snippets "Print": { "prefix": "log", "body": "console.log('$1');", "description": "Console log" }
Tasks (tasks.json)
{ "label": "build", "type": "shell", "command": "npm run build", "group": "build" }