Back to Gitlabhq

GitLab keyboard shortcuts

doc/user/shortcuts.md

18.11.219.1 KB
Original Source

{{< details >}}

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

{{< /details >}}

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 <kbd>?</kbd>.
  • In the lower-left corner of the application, select Help and then 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
<kbd>?</kbd>Show or hide the shortcut reference sheet.
<kbd>Shift</kbd>+<kbd>h</kbd>Go to the homepage.
<kbd>Shift</kbd>+<kbd>p</kbd>Go to your Projects page.
<kbd>Shift</kbd>+<kbd>g</kbd>Go to your Groups page.
<kbd>Shift</kbd>+<kbd>a</kbd>Go to your Activity page.
<kbd>Shift</kbd>+<kbd>l</kbd>Go to your Milestones page.
<kbd>Shift</kbd>+<kbd>s</kbd>Go to your Snippets page.
<kbd>s</kbd> / <kbd>/</kbd>Put cursor in the search bar.
<kbd>f</kbd>Focus filter bar
<kbd>Shift</kbd>+<kbd>i</kbd>Go to your Issues page.
<kbd>Shift</kbd>+<kbd>m</kbd>Go to your Merge requests page.
<kbd>Shift</kbd>+<kbd>r</kbd>Go to your Review requests page.
<kbd>Shift</kbd>+<kbd>t</kbd>Go to your To-Do List page.
<kbd>p</kbd>, then <kbd>b</kbd>Show or hide the Performance Bar.
<kbd>Escape</kbd>Hide tooltips or popovers.
<kbd>g</kbd>, then <kbd>x</kbd>Toggle between GitLab and GitLab Next (GitLab.com only).
<kbd>.</kbd>Open the Web IDE.
<kbd>d</kbd>Open GitLab Duo Chat

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
<kbd></kbd><kbd></kbd>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.
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>p</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>p</kbd>Toggle Markdown preview when editing text in a text field that has Write and Preview tabs at the top.
<kbd>Command</kbd>+<kbd>b</kbd><kbd>Control</kbd>+<kbd>b</kbd>Bold the selected text (surround it with **).
<kbd>Command</kbd>+<kbd>i</kbd><kbd>Control</kbd>+<kbd>i</kbd>Italicize the selected text (surround it with _).
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>x</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>x</kbd>Strike through the selected text (surround it with ~~).
<kbd>Command</kbd>+<kbd>k</kbd><kbd>Control</kbd>+<kbd>k</kbd>Add a link (surround the selected text with []()).
<kbd>Command</kbd>+<kbd>[</kbd><kbd>Control</kbd>+<kbd>[</kbd>Outdent text.
<kbd>Command</kbd>+<kbd>]</kbd><kbd>Control</kbd>+<kbd>]</kbd>Indent text.
<kbd>Command</kbd>+<kbd>Enter</kbd><kbd>Control</kbd>+<kbd>Enter</kbd>Submit 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
<kbd>g</kbd>+<kbd>o</kbd>Go to the Project overview page.
<kbd>g</kbd>+<kbd>v</kbd>Go to the project Activity page (Manage > Activity).
<kbd>g</kbd>+<kbd>r</kbd>Go to the project Releases page (Deploy > Releases).
<kbd>g</kbd>+<kbd>f</kbd>Go to the project files (Code > Repository).
<kbd>t</kbd>Open the project file search dialog. (Code > Repository, select Find Files).
<kbd>g</kbd>+<kbd>c</kbd>Go to the project Commits page (Code > Commits).
<kbd>g</kbd>+<kbd>n</kbd>Go to the Repository graph page (Code > Repository graph).
<kbd>g</kbd>+<kbd>d</kbd>Go to the charts in the Repository analytics page (Analyze > Repository analytics).
<kbd>g</kbd>+<kbd>i</kbd>Go to the project Work items page (Plan > Work items).
<kbd>i</kbd>Go to the New Issue page (Plan > Work items, select New item ).
<kbd>g</kbd>+<kbd>b</kbd>Go to the project Issue boards page (Plan > Issue boards).
<kbd>g</kbd>+<kbd>m</kbd>Go to the project Merge requests page (Code > Merge requests).
<kbd>g</kbd>+<kbd>p</kbd>Go to the CI/CD Pipelines page (Build > Pipelines).
<kbd>g</kbd>+<kbd>j</kbd>Go to the CI/CD Jobs page (Build > Jobs).
<kbd>g</kbd>+<kbd>e</kbd>Go to the project Environments page (Operate > Environments).
<kbd>g</kbd>+<kbd>k</kbd>Go to the project Kubernetes clusters integration page (Operate > Kubernetes clusters). You must have at least maintainer permissions to access this page.
<kbd>g</kbd>+<kbd>s</kbd>Go to the project Snippets page (Code > Snippets).
<kbd>g</kbd>+<kbd>w</kbd>Go to the project wiki (Plan > Wiki), if enabled.
<kbd>.</kbd>Open the Web IDE.

Issues

These shortcuts are available when viewing issues:

Keyboard shortcutDescription
<kbd>e</kbd>Edit description.
<kbd>a</kbd>Change assignee.
<kbd>m</kbd>Change milestone.
<kbd>l</kbd>Change label.
<kbd>c</kbd>+<kbd>r</kbd>Copy issue reference.
<kbd>r</kbd>Start writing a comment. Pre-selected text is quoted in the comment.
<kbd></kbd>Go to the next design.
<kbd></kbd>Go to the previous design.
<kbd>Escape</kbd>Close the design.

Merge requests

These shortcuts are available when viewing merge requests:

macOS shortcutWindows shortcutDescription
<kbd>]</kbd> or <kbd>j</kbd>Move to next file.
<kbd>[</kbd> or <kbd>k</kbd>Move to previous file.
<kbd>Command</kbd>+<kbd>p</kbd><kbd>Control</kbd>+<kbd>p</kbd>Search for, and then jump to a file for review.
<kbd>n</kbd>Move to next open thread.
<kbd>p</kbd>Move to previous open thread.
<kbd>b</kbd>Copy source branch name.
<kbd>c</kbd>+<kbd>r</kbd>Copy merge request reference.
<kbd>r</kbd>Start writing a comment. Pre-selected text is quoted in the comment.
<kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>Enter</kbd><kbd>Shift</kbd>+<kbd>Control</kbd>+<kbd>Enter</kbd>Publish your comment immediately.
<kbd>Command</kbd>+<kbd>Enter</kbd><kbd>Control</kbd>+<kbd>Enter</kbd>Add your comment in a pending state, as part of a review.
<kbd>c</kbd>Move to next commit.
<kbd>x</kbd>Move to previous commit.
<kbd>Shift</kbd>+<kbd>f</kbd>Toggle file browser.
<kbd>v</kbd>Mark file as viewed or unviewed.
<kbd>;</kbd>Expand all files.
<kbd>Shift</kbd>+<kbd>;</kbd>Collapse all files.

Project files

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

Keyboard shortcutDescription
<kbd></kbd>Move selection up (only while searching for files, Code > Repository, then select Find File).
<kbd></kbd>Move selection down (only while searching for files, Code > Repository, then select Find File).
<kbd>Enter</kbd>Open selection (only while searching for files, Code > Repository, then select Find File).
<kbd>Escape</kbd>Go back to the Find File screen (only while searching for files, Code > Repository, then select Find File).
<kbd>y</kbd>Go to file permalink (only while viewing a file).
<kbd>.</kbd>Open the Web IDE.

Repository graph

These shortcuts are available when viewing the project repository graph page (go to Code > Repository graph):

Keyboard shortcutDescription
<kbd></kbd> or <kbd>h</kbd>Scroll left.
<kbd></kbd> or <kbd>l</kbd>Scroll right.
<kbd></kbd> or <kbd>k</kbd>Scroll up.
<kbd></kbd> or <kbd>j</kbd>Scroll down.
<kbd>Shift</kbd>+<kbd></kbd> or <kbd>Shift</kbd>+<kbd>k</kbd>Scroll to top.
<kbd>Shift</kbd>+<kbd></kbd> or <kbd>Shift</kbd>+<kbd>j</kbd>Scroll to bottom.

Incidents

These shortcuts are available when viewing incidents:

Keyboard shortcutDescription
<kbd>c</kbd>+<kbd>r</kbd>Copy incident reference.

Wiki pages

This shortcut is available when viewing a wiki page:

Keyboard shortcutDescription
<kbd>e</kbd>Edit wiki page.

Rich text editor

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

macOS shortcutWindows shortcutDescription
<kbd>Command</kbd>+<kbd>c</kbd><kbd>Control</kbd>+<kbd>c</kbd>Copy
<kbd>Command</kbd>+<kbd>x</kbd><kbd>Control</kbd>+<kbd>x</kbd>Cut
<kbd>Command</kbd>+<kbd>v</kbd><kbd>Control</kbd>+<kbd>v</kbd>Paste
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd>Paste without formatting
<kbd>Command</kbd>+<kbd>z</kbd><kbd>Control</kbd>+<kbd>z</kbd>Undo
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd>Redo
<kbd>Shift</kbd>+<kbd>Enter</kbd><kbd>Shift</kbd>+<kbd>Enter</kbd>Add a line break

Formatting

macOS shortcutWindows/Linux shortcutDescription
<kbd>Command</kbd>+<kbd>b</kbd><kbd>Control</kbd>+<kbd>b</kbd>Bold
<kbd>Command</kbd>+<kbd>i</kbd><kbd>Control</kbd>+<kbd>i</kbd>Italic
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>x</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>x</kbd>Strikethrough
<kbd>Command</kbd>+<kbd>k</kbd><kbd>Control</kbd>+<kbd>k</kbd>Insert a link
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>0</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>0</kbd>Apply normal text style
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>1</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>1</kbd>Apply heading style 1
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>2</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>2</kbd>Apply heading style 2
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>3</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>3</kbd>Apply heading style 3
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>4</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>4</kbd>Apply heading style 4
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>5</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>5</kbd>Apply heading style 5
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>6</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>6</kbd>Apply heading style 6
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>7</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>7</kbd>Ordered list
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>8</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>8</kbd>Unordered list
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>9</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>9</kbd>Task list
<kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>c</kbd><kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>c</kbd>Code block
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>h</kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>h</kbd>Highlight
<kbd>Command</kbd>+<kbd>,</kbd><kbd>Control</kbd>+<kbd>,</kbd>Subscript
<kbd>Command</kbd>+<kbd>.</kbd><kbd>Control</kbd>+<kbd>.</kbd>Superscript
<kbd>Tab</kbd><kbd>Tab</kbd>Indent list
<kbd>Shift</kbd>+<kbd>Tab</kbd><kbd>Shift</kbd>+<kbd>Tab</kbd>Outdent list

Text selection

macOS shortcutWindows shortcutDescription
<kbd>Command</kbd>+<kbd>a</kbd><kbd>Control</kbd>+<kbd>a</kbd>Select all
<kbd>Shift</kbd>+<kbd></kbd><kbd>Shift</kbd>+<kbd></kbd>Extend selection one character to left
<kbd>Shift</kbd>+<kbd></kbd><kbd>Shift</kbd>+<kbd></kbd>Extend selection one character to right
<kbd>Shift</kbd>+<kbd></kbd><kbd>Shift</kbd>+<kbd></kbd>Extend selection one line up
<kbd>Shift</kbd>+<kbd></kbd><kbd>Shift</kbd>+<kbd></kbd>Extend selection one line down
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd></kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd></kbd>Extend selection to the beginning of the document
<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd></kbd><kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd></kbd>Extend selection to the end of the document

GitLab Duo Chat

{{< details >}}

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

{{< /details >}}

{{< history >}}

{{< /history >}}

The following shortcuts are available when using GitLab Duo Non-Agentic Chat with a supported IDE.

macOS shortcutWindows shortcutDescriptionVS CodeJetBrains IDEsVisual Studio
<kbd>Option</kbd>+<kbd>d</kbd><kbd>Alt</kbd>+<kbd>d</kbd>Open or close Chat, or switch focus to Chat if already open{{< yes >}}{{< yes >}}{{< no >}}
<kbd>Option</kbd>+<kbd>n</kbd><kbd>Alt</kbd>+<kbd>n</kbd>In Chat, start a new conversation.{{< yes >}}{{< no >}}{{< no >}}
<kbd>Option</kbd>+<kbd>r</kbd><kbd>Alt</kbd>+<kbd>r</kbd>Refactor code{{< yes >}}{{< no >}}{{< no >}}
<kbd>Option</kbd>+<kbd>t</kbd><kbd>Alt</kbd>+<kbd>t</kbd>Write tests{{< yes >}}{{< no >}}{{< no >}}

You can customize these shortcuts in your IDE.

Customize in VS Code

  1. In VS Code, go to Settings > Keyboard Shortcuts.
  2. In the search text box, enter <kbd>GitLab</kbd> to find all GitLab shortcuts.
  3. For the shortcut you want to customize, select Change Keybinding (Enter) {{< icon name="pencil" >}}.
  4. Press the new shortcut key combination, and press <kbd>Enter</kbd>.

Customize in JetBrains IDEs

  1. In your JetBrains IDE, go to Settings > Keymap, or the equivalent keyboard mapping settings for your IDE.
  2. Find all GitLab shortcuts.
  3. Customize the appropriate shortcut and save.

Customize in Visual Studio

  1. In Visual Studio, go to Tools > Options.
  2. Go to Environment > Keyboard.
  3. In the Show commands containing: text box, enter <kbd>GitLab</kbd> to find all GitLab shortcuts.
  4. Under Press shortcut keys, select the current shortcut key combination.
  5. Press the new shortcut key combination, and select Assign.
  6. Select OK.

Epics

{{< details >}}

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

{{< /details >}}

These shortcuts are available when viewing epics:

Keyboard shortcutDescription
<kbd>e</kbd>Edit description.
<kbd>l</kbd>Change label.
<kbd>c</kbd>+<kbd>r</kbd>Copy epic reference.

Disable keyboard shortcuts

{{< history >}}

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

{{< /history >}}

To disable keyboard shortcuts:

  1. In the upper-right corner, select your avatar.
  2. Select Preferences.
  3. In the Behavior section, clear the Enable keyboard shortcuts checkbox.
  4. Select Save changes.

Enable keyboard shortcuts

{{< history >}}

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

{{< /history >}}

To enable keyboard shortcuts:

  1. In the upper-right corner, 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.