GitLab keyboard shortcuts

  • Tier:Free, Premium, Ultimate
  • Offering:GitLab.com, GitLab Self-Managed, GitLab Dedicated

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 lower-left corner of the application, selectHelpand thenKeyboard shortcuts.

Althoughglobal shortcutswork 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+pGo to yourProjectspage.
Shift+gGo to yourGroupspage.
Shift+aGo to yourActivitypage.
Shift+lGo to yourMilestonespage.
Shift+sGo to yourSnippetspage.
s//Put cursor in the search bar.
Shift+iGo to yourIssuespage.
Shift+mGo to yourMerge requestspage.
Shift+rGo to yourReview requestspage.
Shift+tGo to yourTo-Do Listpage.
p,thenbShow or hide the Performance Bar.
EscapeHide tooltips or popovers.
g,thenxToggle betweenGitLabandGitLab Next(GitLab SaaS only).
.Open theWeb 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+pControl+Shift+pToggle Markdown preview when editing text in a text field that hasWriteandPreviewtabs at the top.
Command+bControl+bBold the selected text (surround it with**).
Command+iControl+iItalicize the selected text (surround it with_).
Command+Shift+xControl+Shift+xStrike through the selected text (surround it with~~).
Command+kControl+kAdd a link (surround the selected text with[]()).
Command+]Control+]Indent text.Introducedin GitLab 15.3.
Command+[Control+[Outdent text.Introducedin GitLab 15.3.
Command+EnterControl+EnterSubmit or save changes

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+oGo to theProject overviewpage.
g+vGo to the projectActivitypage (Manage > Activity).
g+rGo to the projectReleasespage (Deploy > Releases).
g+fGo to theproject files(Code > Repository).
tOpen the project file search dialog. (Code > Repository,selectFind Files).
g+cGo to the projectCommitspage (Code > Commits).
g+nGo to theRepository graphpage (Code > Repository graph).
g+dGo to the charts in theRepository analyticspage (Analyze > Repository analytics).
g+iGo to the projectIssuespage (Plan > Issues).
iGo to theNew Issuepage (Plan > Issues,selectNew issue).
g+bGo to the projectIssue boardspage (Plan > Issue boards).
g+mGo to the projectMerge requestspage (Code > Merge requests).
g+pGo to the CI/CDPipelinespage (Build > Pipelines).
g+jGo to the CI/CDJobspage (Build > Jobs).
g+eGo to the projectEnvironmentspage (Operate > Environments).
g+kGo to the projectKubernetes clustersintegration page (Operate > Kubernetes clusters). You must have at leastmaintainerpermissionsto access this page.
g+sGo to the projectSnippetspage (Code > Snippets).
g+wGo to theproject wiki(Plan > Wiki), if enabled.
.Open theWeb IDE.

Issues

These shortcuts are available when viewing issues:

Keyboard shortcutDescription
eEdit description.
aChange assignee.
mChange milestone.
lChange label.
c+rCopy issue reference.
rStart writing a comment. Pre-selected text is quoted in the comment.
Go to the next design.
Go to the previous design.
EscapeClose the design.

Merge requests

These shortcuts are available when viewingmerge requests:

macOS shortcutWindows shortcutDescription
]orjMove to next file.
[orkMove to previous file.
Command+pControl+pSearch for, and then jump to a file for review.
nMove to next unresolved discussion.
pMove to previous unresolved discussion.
bCopy source branch name.
c+rCopy merge request reference.
rStart writing a comment. Pre-selected text is quoted in the comment.
Shift+Command+EnterShift+Control+EnterPublish your comment immediately.
Command+EnterControl+EnterAdd your comment in a pending state, as part of areview.
cMove to next commit.
xMove to previous commit.
fToggle file browser.

Project files

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

Keyboard shortcutDescription
Move selection up (only while searching for files,Code > Repository,then selectFind File).
Move selection down (only while searching for files,Code > Repository,then selectFind File).
EnterOpen selection (only while searching for files,Code > Repository,then selectFind File).
EscapeGo back to theFind Filescreen (only while searching for files,Code > Repository,then selectFind File).
yGo to file permalink (only while viewing a file).
.Open theWeb IDE.

Repository graph

These shortcuts are available when viewing the projectrepository graph page (go toCode > Repository graph):

Keyboard shortcutDescription
orhScroll left.
orlScroll right.
orkScroll up.
orjScroll down.
Shift+orShift+kScroll to top.
Shift+orShift+jScroll to bottom.

Incidents

These shortcuts are available when viewing incidents:

Keyboard shortcutDescription
c+rCopy incident reference.

Wiki pages

This shortcut is available when viewing awiki 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+cControl+cCopy
Command+xControl+xCut
Command+vControl+vPaste
Command+Shift+vControl+Shift+vPaste without formatting
Command+zControl+zUndo
Command+Shift+vControl+Shift+vRedo
Shift+EnterShift+EnterAdd a line break

Formatting

macOS shortcutWindows/Linux shortcutDescription
Command+bControl+bBold
Command+iControl+iItalic
Command+Shift+xControl+Shift+xStrikethrough
Command+kControl+kInsert a link
Command+Option+0Control+Alt+0Apply normal text style
Command+Option+1Control+Alt+1Apply heading style 1
Command+Option+2Control+Alt+2Apply heading style 2
Command+Option+3Control+Alt+3Apply heading style 3
Command+Option+4Control+Alt+4Apply heading style 4
Command+Option+5Control+Alt+5Apply heading style 5
Command+Option+6Control+Alt+6Apply heading style 6
Command+Shift+7Control+Shift+7Ordered list
Command+Shift+8Control+Shift+8Unordered list
Command+Shift+9Control+Shift+9Task list
Command+Option+cControl+Alt+cCode block
Command+Shift+hControl+Shift+hHighlight
Command+,Control+,Subscript
Command+.Control+.Superscript
TabTabIndent list
Shift+TabShift+TabOutdent list

Text selection

macOS shortcutWindows shortcutDescription
Command+aControl+aSelect 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

Epics

  • Tier:Premium, Ultimate
  • Offering:GitLab.com, GitLab Self-Managed, GitLab Dedicated

These shortcuts are available when viewingepics:

Keyboard shortcutDescription
eEdit description.
lChange label.
c+rCopy epic reference.

Disable keyboard shortcuts

History

To disable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. SelectPreferences.
  3. In theBehaviorsection, clear theEnable keyboard shortcutscheckbox.
  4. SelectSave changes.

Enable keyboard shortcuts

History

To enable keyboard shortcuts:

  1. On the left sidebar, select your avatar.
  2. SelectPreferences.
  3. In theBehaviorsection, select theEnable keyboard shortcutscheckbox.
  4. SelectSave changes.

Troubleshooting

Linux shortcuts

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