GitLab keyboard shortcuts

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 upper-right corner 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 shortcutDescription
?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.
fPut cursor in the filter bar.
Shift + i Go to your Issues page.
Shift + m Go to your Merge requests page.
Shift + r Go to your Review requests page.
Shift + t Go to your To-Do List page.
p, then b Show or hide the Performance Bar.
EscapeHide 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 shortcutWindows shortcutDescription
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 []()).
Command + ] Control + ] Indent list item. Introduced in GitLab 15.3.
Command + [ Control + [ Outdent list item. Introduced in GitLab 15.3.

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 shortcutDescription
g + o Go to the project overview page (Project overview).
g + v Go to the project activity feed (Manage > Activity).
g + r Go to the project releases list (Deploy > Releases).
g + f Go to the project files list (Code > Repository).
tGo to the project file search page. (Code > Repository, select Find Files).
g + c Go to the project commits list (Code > Commits).
g + n Go to the repository graph page (Code > Repository graph).
g + d Go to repository charts (Analyze > Repository analytics).
g + i Go to the project issues list (Plan > Issues).
iGo to the New Issue page (Pan > Issues, select New issue ).
g + b Go to the project issue boards list (Plan > Issue boards).
g + m Go to the project merge requests list (Code > Merge requests).
g + p Go to the CI/CD pipelines list (Build > Pipelines).
g + j Go to the CI/CD jobs list (Build > Jobs).
g + e Go to the project environments (Operate > Environments).
g + k Go to the project Kubernetes cluster integration page (Operate > Kubernetes clusters). You must have at least maintainer permissions to access this page.
g + s Go to the project snippets list (Code > Snippets).
g + w Go to the project wiki (Plan > Wiki), if enabled.
.Open the Web IDE.

Issues

These shortcuts are available when viewing issues:

Keyboard shortcutDescription
eEdit description.
aChange assignee.
mChange milestone.
lChange label.
c + r Copy issue reference.
rStart 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.
EscapeClose the design.

Merge requests

These shortcuts are available when viewing merge requests:

macOS shortcutWindows shortcutDescription
] 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.
c + r  Copy merge request reference.
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.
f Toggle file browser.

Project files

These shortcuts are available when browsing the files in a project (go to Code > Repository):

Keyboard shortcutDescription
Move selection up.
Move selection down.
EnterOpen selection.
EscapeGo back to file list screen (only while searching for files, Code > Repository, then select Find File).
yGo 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 shortcutWindows/Linux shortcutDescription
Option + Command + Shift + Alt + Add cursor above
Option + Command + Shift + Alt + Add cursor below
Shift + Option + I Shift + Alt + I Add cursors to line ends
Command + K, Command + C Control + K, Control + C or Control + / Add line comment
Command + D Control + D Add selection to next find match
Command + F2 Control + F2 Change all occurrences
F1F1Command palette
Shift + Option + Control + Shift + Alt + Copy line down
Shift + Option + Control + Shift + Alt + Copy line up (Linux note)
Command + U Control + U Cursor undo
Command + Backspace Control + Shift + Backspace Delete all left
Control + K  Delete all right
Shift + Command + K Control + Shift + K Delete line
  Control + Backspace Delete word
Control + Shift + Command + Shift + Alt + Expand selection
Command + P Control + P File finder
Command + F Control + F Find
Enter Enter or F3 Find next
Command + F3 F3Find next selection (Linux note)
Shift + Enter + F3 Shift + F3 Find previous
Shift + Command + F3 Shift + F3 Find previous selection
Command + E  Find with selection
Option + Command + [ Control + Shift + [ Fold
Command + K, then Command + O Control + K, then Control + O Fold all
Command + K, then Command + / Control + K, then Control + / Fold all block comments
Command + K , then Command + 8 Control + K , then Control + 8 Fold all regions
Command + K , then Command + - Control + K , then Control + - Fold all regions except selected
Command + K , then Command + 1 Control + K , then Control + 1 Fold level 1
Command + K , then Command + 2 Control + K , then Control + 2 Fold level 2
Command + K , then Command + 3 Control + K , then Control + 3 Fold level 3
Command + K , then Command + 4 Control + K , then Control + 4 Fold level 4
Command + K , then Command + 5 Control + K , then Control + 5 Fold level 5
Command + K , then Command + 6 Control + K , then Control + 6 Fold level 6
Command + K , then Command + 7 Control + K , then Control + 7 Fold level 7
Command + K , then Command + [ Control + K , then Control + [ Fold recursively
Shift + Command + \ Control + Shift + \ Go to bracket
Control + G Control + G Go to line or column
Option + F8 Alt + F8 Go to next problem (error, warning, information)
F8F8Go to next problem in files (error, warning, information)
Shift + Option + F8 Shift + Alt + F8 Go to previous problem (error, warning, information)
Shift + F8 Shift + F8 Go to previous problem in files (error, warning, information)
Command + ] Control + ] Indent line
Shift + Command Control + Shift + Enter Insert line above
Command + Enter Control + Enter Insert line below
Control + J Control + J Join lines (Linux note)
Command + K, then Command + D Control + K, then Control + D Move last selection to next find match
Option + Alt + Move line down
Option + Alt + Move line up
Command + [ Control + [ Outdent line
Shift + Command + P Control + Shift + P Preview Markdown (Linux note)
Command + K, then Command + U Control + K, then Control + U or Control + / Remove line comment
Option + Command + F Control + F Replace
Shift + Command + . Control + Shift + . Replace with next value
Shift + Command + , Control + Shift + , Replace with previous value
Command + S Control + S Save files
Shift + Command + L Control + Shift + L Select all occurrences of find match
Command + K, then Command + B Control + K, then Control + B Set selection anchor
Option + F1 Shift + Alt + F1 Show accessibility help
Shift + F10 Shift + F10 Show editor context menu
Command + K, then Command + I Control + K, then Control + I Show hover
Control + Shift + Command + Shift + Alt + Shrink selection
Shift + Option + A Control + Shift + A Toggle block comment
Command + K, then Command + L Control + K, then Control + L Toggle fold
Control + Shift + M Control + M Toggle Tab key moves focus
Command + / Control + / Toggle line comment
Control + T  Transpose letters
Control + Space Control + Space Trigger Suggest
Command + K, then Command + X Control + K, then Control + X Trim trailing whitespace
Option + Command + ] Control + Shift + ] Unfold
Command + K, then Command + J Control + K, then Control + J Unfold all
Command + K, then Command + 9 Control + K, then Control + 9 Unfold all regions
Command + K, then Command + = Control + K, then Control + = Unfold all regions except selected
Command + K, then Command + ] Control + K, then Control + ] Unfold recursively
Command + K, then Command + X Control + K, then Control + 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 Code > Repository graph):

Keyboard shortcutDescription
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.

Incidents

These shortcuts are available when viewing incidents:

Keyboard shortcutDescription
c + r Copy incident reference.

Wiki pages

This shortcut is available when viewing a wiki page:

Keyboard shortcutDescription
eEdit wiki page.

Rich text editor

These shortcuts are available when editing a file with the rich text editor:

macOS shortcutWindows shortcutDescription
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 shortcutWindows/Linux shortcutDescription
Command + b Control + b Bold
Command + i Control + i Italic
Command + Shift + x Control + Shift + x Strikethrough
Command + e Control + e Code
Command + k Control + k Insert a link
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 Unordered list
Command + Shift + 9 Control + Shift + 9 Task list
Command + Shift + b Control + Shift + b Blockquote
Command + Alt + c Control + Alt + c Code block
Command + Shift + h Control + Shift + h Highlight
Command + , Control + , Subscript
Command + . Control + . Superscript
TabTabIndent list
Shift + Tab Shift + Tab Outdent list

Text selection

macOS shortcutWindows shortcutDescription
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

These shortcuts are available when using a filtered search input:

macOS shortcutWindows shortcutDescription
CommandDeleteClear entire search filter.
Option Control + Delete Clear one token at a time.

Epics

These shortcuts are available when viewing epics:

Keyboard shortcutDescription
rStart writing a comment. Pre-selected text is quoted in the comment. Can’t be used to reply in a thread.
eEdit description.
lChange label.
c + r Copy epic reference.

Disable keyboard shortcuts

Moved from the shortcuts page to user preferences in GitLab 16.4.

To disable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. Select Preferences.
  3. In the Behavior section, clear the Enable keyboard shortcuts checkbox.
  4. Select Save changes.

Enable keyboard shortcuts

Moved from the shortcuts page to user preferences in GitLab 16.4.

To enable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. Select Preferences.
  3. In the Behavior section, select the Enable keyboard shortcuts checkbox.
  4. Select Save changes.

Troubleshooting

Linux shortcuts

Linux users may encounter GitLab keyboard shortcuts that are overridden by their operating system, or their browser.