22 KiB
stage | group | info | type | disqus_identifier |
---|---|---|---|---|
Create | Editor | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments | reference | https://docs.gitlab.com/ee/workflow/shortcuts.html |
GitLab keyboard shortcuts (FREE)
GitLab has several keyboard shortcuts you can use to access its different features.
To display a window in GitLab that lists its keyboard shortcuts, use one of the following methods:
- Press ?.
- In the Help menu in the top right of the application, select Keyboard shortcuts.
Although global shortcuts work from any area of GitLab, you must be in specific pages for the other shortcuts to be available, as explained in each section.
Global shortcuts
These shortcuts are available in most areas of GitLab:
Keyboard shortcut | Description |
---|---|
? | Show or hide the shortcut reference sheet. |
Shift + p | Go to your Projects page. |
Shift + g | Go to your Groups page. |
Shift + a | Go to your Activity page. |
Shift + l | Go to your Milestones page. |
Shift + s | Go to your Snippets page. |
s / / | Put cursor in the search bar. |
f | Put cursor in the filter bar. |
Shift + i | Go to your Issues page. |
Shift + m | Go to your Merge requests page. |
Shift + t | Go to your To-Do List page. |
p, then b | Show or hide the Performance Bar. |
Escape | Hide tooltips or popovers. |
g, then x | Toggle between GitLab and GitLab Next (GitLab SaaS only). |
. | Open the Web IDE. |
Additionally, the following shortcuts are available when editing text in text fields (for example, comments, replies, issue descriptions, and merge request descriptions):
macOS shortcut | Windows shortcut | Description |
---|---|---|
↑ | ↑ | Edit your last comment. You must be in a blank text field below a thread, and you must already have at least one comment in the thread. |
Command + Shift + p | Control + Shift + p | Toggle Markdown preview when editing text in a text field that has Write and Preview tabs at the top. |
Command + b | Control + b | Bold the selected text (surround it with ** ). |
Command + i | Control + i | Italicize the selected text (surround it with _ ). |
Command + Shift + x | Control + Shift + x | Strike through the selected text (surround it with ~~ ). |
Command + k | Control + k | Add a link (surround the selected text with []() ). |
The shortcuts for editing in text fields are always enabled, even if other keyboard shortcuts are disabled.
Project
These shortcuts are available from any page in a project. You must type them relatively quickly to work, and they take you to another page in the project.
Keyboard shortcut | Description |
---|---|
g + p | Go to the project home page (Project > Details). |
g + v | Go to the project activity feed (Project > Activity). |
g + r | Go to the project releases list (Project > Releases). |
g + f | Go to the project files list (Repository > Files). |
t | Go to the project file search page. (Repository > Files, select Find Files). |
g + c | Go to the project commits list (Repository > Commits). |
g + n | Go to the repository graph page (Repository > Graph). |
g + d | Go to repository charts (Analytics > Repository Analytics). |
g + i | Go to the project issues list (Issues > List). |
i | Go to the New Issue page (Issues, select New Issue ). |
g + b | Go to the project issue boards list (Issues > Boards). |
g + m | Go to the project merge requests list (Merge Requests). |
g + j | Go to the CI/CD jobs list (CI/CD > Jobs). |
g + l | Go to the project metrics (Monitor > Metrics). |
g + e | Go to the project environments (Deployments > Environments). |
g + k | Go to the project Kubernetes cluster integration page (Infrastructure > Kubernetes clusters). You must have at least maintainer permissions to access this page. |
g + s | Go to the project snippets list (Snippets). |
g + w | Go to the project wiki (Wiki), if enabled. |
. | Open the Web IDE. |
Issues
These shortcuts are available when viewing issues:
Keyboard shortcut | Description |
---|---|
e | Edit description. |
a | Change assignee. |
m | Change milestone. |
l | Change label. |
r | Start writing a comment. Pre-selected text is quoted in the comment. Can't be used to reply in a thread. |
. | Open the Web IDE. |
→ | Go to the next design. |
← | Go to the previous design. |
Escape | Close the design. |
Merge requests
These shortcuts are available when viewing merge requests:
macOS shortcut | Windows shortcut | Description |
---|---|---|
] or j | Move to next file. | |
[ or k | Move to previous file. | |
Command + p | Control + p | Search for, and then jump to a file for review. |
n | Move to next unresolved discussion. | |
p | Move to previous unresolved discussion. | |
b | Copy source branch name. | |
r | Start writing a comment. Pre-selected text is quoted in the comment. Can't be used to reply in a thread. | |
c | Move to next commit. | |
x | Move to previous commit. |
Project files
These shortcuts are available when browsing the files in a project (go to Repository > Files):
Keyboard shortcut | Description |
---|---|
↑ | Move selection up. |
↓ | Move selection down. |
Enter | Open selection. |
Escape | Go back to file list screen (only while searching for files, Repository > Files, then select Find File). |
y | Go to file permalink (only while viewing a file). |
. | Open the Web IDE. |
Web IDE
These shortcuts are available when editing a file with the Web IDE:
macOS shortcut | Windows shortcut | Description |
---|---|---|
Option + Command + ↑ | Add cursor above | |
Option + Command + ↓ | Add cursor below | |
Shift + Option + I | Add cursors to line ends | |
Command + K, Command + C | Control + K, Control + C or Control + / | Add line comment |
Command + D | Add selection to next find match | |
Command + F2 | Change all occurrences | |
F1 | Command palette | |
Shift + Option + ↓ | Copy line down | |
Shift + Option + ↑ | Copy line up | |
Command + U | Cursor undo | |
Command + Backspace | Delete all left | |
Control + K | Delete all right | |
Shift + Command + K | Delete line | |
Control + Shift + Command + → | Expand selection | |
Command + P | File finder | |
Command + F | Find | |
Enter | Find next | |
Command + F3 | Find next selection | |
Shift + Enter + F3 | Find previous | |
Shift + Command + F3 | Find previous selection | |
Command + E | Find with selection | |
Option + Command + [ | Fold | |
Command + K, then Command + O | Fold all | |
Command + K, then Command + / | Fold all block comments | |
Command + K , then Command + 8 | Fold all regions | |
Command + K , then Command + - | Fold all regions except selected | |
Command + K , then Command + 1 | Fold level 1 | |
Command + K , then Command + 2 | Fold level 2 | |
Command + K , then Command + 3 | Fold level 3 | |
Command + K , then Command + 4 | Fold level 4 | |
Command + K , then Command + 5 | Fold level 5 | |
Command + K , then Command + 6 | Fold level 6 | |
Command + K , then Command + 7 | Fold level 7 | |
Command + K , then Command + [ | Fold recursively | |
Shift + Command + \ | Go to bracket | |
Control + G | Go to line or column | |
Option + F8 | Go to next problem (error, warning, information) | |
F8 | Go to next problem in files (error, warning, information) | |
Shift + Option + F8 | Go to previous problem (error, warning, information) | |
Shift + F8 | Go to previous problem in files (error, warning, information) | |
Command + ] | Indent line | |
Shift + Command | Enter Insert line above | |
Command + Enter | Insert line below | |
Control + J | Join lines | |
Command + K, then Command + D | Move last selection to next find match | |
Option + ↓ | Move line down | |
Option + ↑ | Move line up | |
Command + [ | Outdent line | |
Shift + Command + P | Preview Markdown | |
Command + K, then Command + U | Remove line comment | |
Option + Command + F | Replace | |
Shift + Command + . | Replace with next value | |
Shift + Command + , | Replace with previous value | |
Command + S | Save files | |
Command + P | Control + P | Search for, and then open another file for editing. |
Shift + Command + L | Select all occurrence of Find Match | |
Command + K, then Command + B | Set selection anchor | |
Option + F1 | Show accessibility help | |
Shift + F10 | Show editor context menu | |
Command + K, then Command + I | Show hover | |
Control + Shift + Command + ← | Shrink selection | |
Shift + Option + A | Toggle block comment | |
Command + K, then Command + L | Toggle fold | |
Command + / | Toggle line comment | |
Control + Shift + M | Toggle Tab key moves focus | |
Control + T | Transpose letters | |
Control + Space | Trigger Suggest | |
Command + K, then Command + X | Trim trailing whitespace | |
Option + Command + ] | Unfold | |
Command + K, then Command + J | Unfold all | |
Command + K, then Command + 9 | Unfold all regions | |
Command + K, then Command + = | Unfold all regions except selected | |
Command + K, then Command + ] | Unfold recursively | |
Command + K, then Command + X | Trim trailing whitespace | |
Command + Enter | Control + Enter | Commit (when editing the commit message). |
Repository graph
These shortcuts are available when viewing the project repository graph page (go to Repository > Graph):
Keyboard shortcut | Description |
---|---|
← or h | Scroll left. |
→ or l | Scroll right. |
↑ or k | Scroll up. |
↓ or j | Scroll down. |
Shift + ↑ or Shift + k | Scroll to top. |
Shift + ↓ or Shift + j | Scroll to bottom. |
Wiki pages
This shortcut is available when viewing a wiki page:
Keyboard shortcut | Description |
---|---|
e | Edit wiki page. |
Content editor
These shortcuts are available when editing a file with the Content Editor:
macOS shortcut | Windows shortcut | Description |
---|---|---|
Command + C | Control + C | Copy |
Command + X | Control + X | Cut |
Command + V | Control + V | Paste |
Command + Shift + V | Control + Shift + V | Paste without formatting |
Command + Z | Control + Z | Undo |
Command + Shift + V | Control + Shift + V | Redo |
Shift + Enter | Shift + Enter | Add a line break |
Formatting
macOS shortcut | Windows/Linux shortcut | Description |
---|---|---|
Command + b | Control + b | Bold |
Command + i | Control + i | Italic |
Command + Shift + x | Control + Shift + x | Strikethrough |
Command + e | Control + e | Code |
Command + Alt + 0 | Control + Alt + 0 | Apply normal text style |
Command + Alt + 1 | Control + Alt + 1 | Apply heading style 1 |
Command + Alt + 2 | Control + Alt + 2 | Apply heading style 2 |
Command + Alt + 3 | Control + Alt + 3 | Apply heading style 3 |
Command + Alt + 4 | Control + Alt + 4 | Apply heading style 4 |
Command + Alt + 5 | Control + Alt + 5 | Apply heading style 5 |
Command + Alt + 6 | Control + Alt + 6 | Apply heading style 6 |
Command + Shift + 7 | Control + Shift + 7 | Ordered list |
Command + Shift + 8 | Control + Shift + 8 | Bullet list |
Command + Shift + 9 | Control + Shift + 9 | Task list |
Command + Shift + b | Control + Shift + b | Blockquote |
Command + Alt + c | Control + Shift + c | Code block |
Command + , | Control + , | Subscript |
Command + . | Control + . | Superscript |
Tab | Tab | Indent list |
Shift + Tab | Shift + Tab | Outdent list |
Text selection
macOS shortcut | Windows shortcut | Description |
---|---|---|
Command + a | Control + a | Select all |
Shift + ← | Shift + ← | Extend selection one character to left |
Shift + → | Shift + → | Extend selection one character to right |
Shift + ↑ | Shift + ↑ | Extend selection one line up |
Shift + ↓ | Shift + ↓ | Extend selection one line down |
Command + Shift + ↑ | Control + Shift + ↑ | Extend selection to the beginning of the document |
Command + Shift + ↓ | Control + Shift + ↓ | Extend selection to the end of the document |
Filtered search
These shortcuts are available when using a filtered search input:
macOS shortcut | Windows shortcut | Description |
---|---|---|
Command | Delete | Clear entire search filter. |
Option | Control + Delete | Clear one token at a time. |
Epics (PREMIUM)
These shortcuts are available when viewing epics:
Keyboard shortcut | Description |
---|---|
r | Start writing a comment. Pre-selected text is quoted in the comment. Can't be used to reply in a thread. |
e | Edit description. |
l | Change label. |
Metrics
These shortcuts are available when using metrics:
Keyboard shortcut | Description |
---|---|
e | Expand panel. |
l | View logs. |
d | Download CSV. |
c | Copy link to chart. |
a | Alerts. |
Disable keyboard shortcuts
Introduced in GitLab 12.8.
To disable keyboard shortcuts:
- While viewing a page that supports keyboard shortcuts, and outside a text box, press ? to display the list of shortcuts.
- Select Toggle shortcuts.