Chia sẻ của học viên

Phím tắt mặc định của VScode trên máy Mac

TX
Trần Xuân Hiếu
Xuất bản 1/8/2025・Cập nhật 1/8/2025

Máy Mac ngày càng được sử dụng nhiều trong việc lập trình và VScode là một công cụ mà các lập trình viên hay dùng bởi tính tiện lợi của nó. Nhưng các lập trình chuyển từ máy chạy Win sang máy Mac đôi gặp khá nhiều khó khăn khi sử dụng do chưa quen. Bài viết dưới đây liệt kê các phím tắt mà SVcode hỗ trợ trên máy Mac.

Câu lệnh soạn thảo căn bản

CommandKeyCommand id
Cut line (empty selection)⌘X

editor.action.clipboardCutAction

Copy line (empty selection)⌘C

editor.action.clipboardCopyAction

Paste⌘V

editor.action.clipboardPasteAction

Delete Line⇧⌘K

editor.action.deleteLines

Insert Line Below⌘Enter

editor.action.insertLineAfter

Insert Line Above⇧⌘Enter

editor.action.insertLineBefore

Move Line Down⌥↓

editor.action.moveLinesDownAction

Move Line Up⌥↑

editor.action.moveLinesUpAction

Copy Line Down⇧⌥↓

editor.action.copyLinesDownAction

Copy Line Up⇧⌥↑

editor.action.copyLinesUpAction

Undo⌘Z

undo

Redo⇧⌘Z

redo

Add Selection To Next Find Match⌘D

editor.action.addSelectionToNextFindMatch

Move Last Selection To Next Find Match⌘K ⌘D

editor.action.moveSelectionToNextFindMatch

Undo last cursor operation⌘U

cursorUndo

Insert cursor at end of each line selected⇧⌥I

editor.action.insertCursorAtEndOfEachLineSelected

Select all occurrences of current selection⇧⌘L

editor.action.selectHighlights

Select all occurrences of current word⌘F2

editor.action.changeAll

Select current line⌘L

expandLineSelection

Insert Cursor Below⌥⌘↓

editor.action.insertCursorBelow

Insert Cursor Above⌥⌘↑

editor.action.insertCursorAbove

Jump to matching bracket⇧⌘\

editor.action.jumpToBracket

Indent Line⌘]

editor.action.indentLines

Outdent Line⌘[

editor.action.outdentLines

Go to Beginning of LineHome

cursorHome

Go to End of LineEnd

cursorEnd

Go to End of File⌘↓

cursorBottom

Go to Beginning of File⌘↑

cursorTop

Scroll Line Down⌃PageDown

scrollLineDown

Scroll Line Up⌃PageUp

scrollLineUp

Scroll Page Down⌘PageDown

scrollPageDown

Scroll Page Up⌘PageUp

scrollPageUp

Fold (collapse) region⌥⌘[

editor.fold

Unfold (uncollapse) region⌥⌘]

editor.unfold

Fold (collapse) all subregions⌘K ⌘[

editor.foldRecursively

Unfold (uncollapse) all subregions⌘K ⌘]

editor.unfoldRecursively

Fold (collapse) all regions⌘K ⌘0

editor.foldAll

Unfold (uncollapse) all regions⌘K ⌘J

editor.unfoldAll

Add Line Comment⌘K ⌘C

editor.action.addCommentLine

Remove Line Comment⌘K ⌘U

editor.action.removeCommentLine

Toggle Line Comment⌘/

editor.action.commentLine

Toggle Block Comment⇧⌥A

editor.action.blockComment

Find⌘F

actions.find

Replace⌥⌘F

editor.action.startFindReplaceAction

Find NextEnter

editor.action.nextMatchFindAction

Find Previous⇧Enter

editor.action.previousMatchFindAction

Select All Occurrences of Find Match⌥Enter

editor.action.selectAllMatches

Toggle Find Case Sensitive⌥⌘C

toggleFindCaseSensitive

Toggle Find Regex⌥⌘R

toggleFindRegex

Toggle Find Whole Word⌥⌘W

toggleFindWholeWord

Toggle Use of Tab Key for Setting Focus⌃⇧M

editor.action.toggleTabFocusMode

Toggle Render Whitespaceunassigned

toggleRenderWhitespace

Toggle Word Wrap⌥Z

editor.action.toggleWordWrap

Chỉnh sửa đa ngôn ngữ (Rich Languages Editing)

CommandKeyCommand id
Trigger Suggest⌃Space

editor.action.triggerSuggest

Trigger Parameter Hints⇧⌘Space

editor.action.triggerParameterHints

Format Document⇧⌥F

editor.action.formatDocument

Format Selection⌘K ⌘F

editor.action.formatSelection

Go to DefinitionF12

editor.action.revealDefinition

Show Hover⌘K ⌘I

editor.action.showHover

Peek Definition⌥F12

editor.action.peekDefinition

Open Definition to the Side⌘K F12

editor.action.revealDefinitionAside

Quick Fix⌘.

editor.action.quickFix

Go to References⇧F12

editor.action.goToReferences

Rename SymbolF2

editor.action.rename

Replace with Next Value⇧⌘.

editor.action.inPlaceReplace.down

Replace with Previous Value⇧⌘,

editor.action.inPlaceReplace.up

Expand AST Selection⌃⇧⌘→

editor.action.smartSelect.expand

Shrink AST Selection⌃⇧⌘←

editor.action.smartSelect.shrink

Trim Trailing Whitespace⌘K ⌘X

editor.action.trimTrailingWhitespace

Change Language Mode⌘K M

workbench.action.editor.changeLanguageMode

Điều hướng (Navigation)

CommandKeyCommand id
Show All Symbols⌘T

workbench.action.showAllSymbols

Go to Line…⌃G

workbench.action.gotoLine

Go to File…, Quick Open⌘P

workbench.action.quickOpen

Go to Symbol…⇧⌘O

workbench.action.gotoSymbol

Show Problems⇧⌘M

workbench.actions.view.problems

Go to Next Error or WarningF8

editor.action.marker.nextInFiles

Go to Previous Error or Warning⇧F8

editor.action.marker.prevInFiles

Show All Commands⇧⌘P or F1

workbench.action.showCommands

Navigate Editor Group History⌃Tab

workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup

Go Back⌃-

workbench.action.navigateBack

Go back in Quick Input⌃-

workbench.action.quickInputBack

Go Forward⌃⇧-

workbench.action.navigateForward

Trình chỉnh sửa / Quản lý cửa sổ(Editor/Window Management)

CommandKeyCommand id
New Window⇧⌘N

workbench.action.newWindow

Close Window⌘W

workbench.action.closeWindow

Close Editor⌘W

workbench.action.closeActiveEditor

Close Folder⌘K F

workbench.action.closeFolder

Cycle Between Editor Groupsunassigned

workbench.action.navigateEditorGroups

Split Editor⌘\

workbench.action.splitEditor

Focus into First Editor Group⌘1

workbench.action.focusFirstEditorGroup

Focus into Second Editor Group⌘2

workbench.action.focusSecondEditorGroup

Focus into Third Editor Group⌘3

workbench.action.focusThirdEditorGroup

Focus into Editor Group on the Leftunassigned

workbench.action.focusPreviousGroup

Focus into Editor Group on the Rightunassigned

workbench.action.focusNextGroup

Move Editor Left⌘K ⇧⌘←

workbench.action.moveEditorLeftInGroup

Move Editor Right⌘K ⇧⌘→

workbench.action.moveEditorRightInGroup

Move Active Editor Group Left⌘K ←

workbench.action.moveActiveEditorGroupLeft

Move Active Editor Group Right⌘K →

workbench.action.moveActiveEditorGroupRight

Move Editor into Next Group⌃⌘→

workbench.action.moveEditorToNextGroup

Move Editor into Previous Group⌃⌘←

workbench.action.moveEditorToPreviousGroup

Quản lý file(File Management)

CommandKeyCommand id
New File⌘N

workbench.action.files.newUntitledFile

Open File…⌘O

workbench.action.files.openFile

Save⌘S

workbench.action.files.save

Save All⌥⌘S

saveAll

Save As…⇧⌘S

workbench.action.files.saveAs

Close⌘W

workbench.action.closeActiveEditor

Close Others⌥⌘T

workbench.action.closeOtherEditors

Close Group⌘K W

workbench.action.closeEditorsInGroup

Close Other Groupsunassigned

workbench.action.closeEditorsInOtherGroups

Close Group to Leftunassigned

workbench.action.closeEditorsToTheLeft

Close Group to Rightunassigned

workbench.action.closeEditorsToTheRight

Close All⌘K ⌘W

workbench.action.closeAllEditors

Reopen Closed Editor⇧⌘T

workbench.action.reopenClosedEditor

Keep Open⌘K Enter

workbench.action.keepEditor

Copy Path of Active File⌘K P

workbench.action.files.copyPathOfActiveFile

Reveal Active File in Windows⌘K R

workbench.action.files.revealActiveFileInWindows

Show Opened File in New Window⌘K O

workbench.action.files.showOpenedFileInNewWindow

Compare Opened File Withunassigned

workbench.files.action.compareFileWith

Hiển thị (Display)

CommandKeyCommand id
Toggle Full Screen⌃⌘F

workbench.action.toggleFullScreen

Toggle Zen Mode⌘K Z

workbench.action.toggleZenMode

Leave Zen ModeEscape Escape

workbench.action.exitZenMode

Zoom in⌘=

workbench.action.zoomIn

Zoom out⌘-

workbench.action.zoomOut

Reset Zoom⌘Numpad0

workbench.action.zoomReset

Toggle Sidebar Visibility⌘B

workbench.action.toggleSidebarVisibility

Show Explorer / Toggle Focus⇧⌘E

workbench.view.explorer

Show Search⇧⌘F

workbench.view.search

Show Source Control⌃⇧G

workbench.view.scm

Show Run⇧⌘D

workbench.view.debug

Show Extensions⇧⌘X

workbench.view.extensions

Show Output⇧⌘U

workbench.action.output.toggleOutput

Quick Open View⌃Q

workbench.action.quickOpenView

Open New Command Prompt⇧⌘C

workbench.action.terminal.openNativeConsole

Toggle Markdown Preview⇧⌘V

markdown.showPreview

Open Preview to the Side⌘K V

markdown.showPreviewToSide

Toggle Integrated Terminal⌃`

workbench.action.terminal.toggleTerminal

CommandKeyCommand id
Show Search⇧⌘F

workbench.view.search

Replace in Files⇧⌘H

workbench.action.replaceInFiles

Toggle Match Case⌥⌘C

toggleSearchCaseSensitive

Toggle Match Whole Word⌥⌘W

toggleSearchWholeWord

Toggle Use Regular Expression⌥⌘R

toggleSearchRegex

Toggle Search Details⇧⌘J

workbench.action.search.toggleQueryDetails

Focus Next Search ResultF4

search.action.focusNextSearchResult

Focus Previous Search Result⇧F4

search.action.focusPreviousSearchResult

Show Next Search Term

history.showNext

Show Previous Search Term

history.showPrevious

Trình chỉnh sửa Tìm kiếm(Search Editor)

CommandKeyCommand id
Open Results In Editor⌘Enter

search.action.openInEditor

Focus Search Editor InputEscape

search.action.focusQueryEditorWidget

Search Again⇧⌘R

rerunSearchEditorSearch

Delete File Results⇧⌘Backspace

search.searchEditor.action.deleteFileResults

Tùy chọn(Preferences)

CommandKeyCommand id
Open Settings⌘,

workbench.action.openSettings

Open Workspace Settingsunassigned

workbench.action.openWorkspaceSettings

Open Keyboard Shortcuts⌘K ⌘S

workbench.action.openGlobalKeybindings

Open User Snippetsunassigned

workbench.action.openSnippets

Select Color Theme⌘K ⌘T

workbench.action.selectTheme

Configure Display Languageunassigned

workbench.action.configureLocale

Gỡ lỗi (Debug)

CommandKeyCommand id
Toggle BreakpointF9

editor.debug.action.toggleBreakpoint

StartF5

workbench.action.debug.start

ContinueF5

workbench.action.debug.continue

Start (without debugging)⌃F5

workbench.action.debug.run

PauseF6

workbench.action.debug.pause

Step IntoF11

workbench.action.debug.stepInto

Nhiệm vụ(Tasks)

CommandKeyCommand id
Run Build Task⇧⌘B

workbench.action.tasks.build

Run Test Taskunassigned

workbench.action.tasks.test

vscode shortcuts for Mac

phím tắt vscode cho máy Mac

vscode shortcuts for win mac

Phím tắt trên window để tiện so sánh.

Nguồn VScode

Bạn đã sẵn sàng đổi thay sự nghiệp chưa?

Onschool Bootcamp tự hào chỉ trong 120 ngày, đào tạo thế hệ lập trình viên kiến tạo thế giới số - bắt đầu từ con số 0

Đừng quên chia sẻ bài viết này!

facebook
linkedin
x
copy
Sao chép link

Đăng ký tư vấn

Các Chương trình Đào tạo tại Onschool Bootcamp

Fullstack java web developer
Fullstack javascript (Nodejs & reactjs web developer
Fullstack Python web developer
Fullstack PHP web developer
Cross-Platform Mobile App Development
phonezalomessenger