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

Nội dung

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

Command Key Command 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 Line Home cursorHome
Go to End of Line End 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 Next Enter 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 Whitespace unassigned toggleRenderWhitespace
Toggle Word Wrap ⌥Z editor.action.toggleWordWrap

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

Command Key Command 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 Definition F12 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 Symbol F2 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)

Command Key Command 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 Warning F8 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)

Command Key Command 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 Groups unassigned 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 Left unassigned workbench.action.focusPreviousGroup
Focus into Editor Group on the Right unassigned 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)

Command Key Command 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 Groups unassigned workbench.action.closeEditorsInOtherGroups
Close Group to Left unassigned workbench.action.closeEditorsToTheLeft
Close Group to Right unassigned 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 With unassigned workbench.files.action.compareFileWith

Hiển thị (Display)

Command Key Command id
Toggle Full Screen ⌃⌘F workbench.action.toggleFullScreen
Toggle Zen Mode ⌘K Z workbench.action.toggleZenMode
Leave Zen Mode Escape 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
Command Key Command 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 Result F4 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)

Command Key Command id
Open Results In Editor ⌘Enter search.action.openInEditor
Focus Search Editor Input Escape search.action.focusQueryEditorWidget
Search Again ⇧⌘R rerunSearchEditorSearch
Delete File Results ⇧⌘Backspace search.searchEditor.action.deleteFileResults

Tùy chọn(Preferences)

Command Key Command id
Open Settings ⌘, workbench.action.openSettings
Open Workspace Settings unassigned workbench.action.openWorkspaceSettings
Open Keyboard Shortcuts ⌘K ⌘S workbench.action.openGlobalKeybindings
Open User Snippets unassigned workbench.action.openSnippets
Select Color Theme ⌘K ⌘T workbench.action.selectTheme
Configure Display Language unassigned workbench.action.configureLocale

Gỡ lỗi (Debug)

Command Key Command id
Toggle Breakpoint F9 editor.debug.action.toggleBreakpoint
Start F5 workbench.action.debug.start
Continue F5 workbench.action.debug.continue
Start (without debugging) ⌃F5 workbench.action.debug.run
Pause F6 workbench.action.debug.pause
Step Into F11 workbench.action.debug.stepInto

Nhiệm vụ(Tasks)

Command Key Command id
Run Build Task ⇧⌘B workbench.action.tasks.build
Run Test Task unassigned 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

Để lại một câu trả lời

gọi ngay
gọi ngay
gọi ngay