From 62af437b04878ee961b672934a5b7ea72e50fc4f Mon Sep 17 00:00:00 2001 From: Martin Hanzel Date: Wed, 24 Jul 2019 09:16:44 +0200 Subject: Update shortcuts docs --- app/views/help/_shortcuts.html.haml | 32 ++++++++++++++++++++++++++++++++ doc/user/markdown.md | 8 ++++++-- doc/workflow/shortcuts.md | 10 ++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index efb3815b257..d4e12f67c60 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -107,6 +107,38 @@ %td.shortcut %kbd esc %td Go back + %tbody + %tr + %th + %th Markdown Editor + %tr + %td.shortcut + - if browser.platform.mac? + %kbd ⌘ ] + - else + %kbd ctrl ] + %td Indent + %tr + %td.shortcut + - if browser.platform.mac? + %kbd ⌘ [ + - else + %kbd ctrl [ + %td Unindent + %tr + %td.shortcut + - if browser.platform.mac? + %kbd ⌘ z + - else + %kbd ctrl z + %td Undo + %tr + %td.shortcut + - if browser.platform.mac? + %kbd ⌘ shift z + - else + %kbd ctrl shift z + %td Redo .col-lg-4 %table.shortcut-mappings %tbody diff --git a/doc/user/markdown.md b/doc/user/markdown.md index 8e973ce03c8..d2857cd6638 100644 --- a/doc/user/markdown.md +++ b/doc/user/markdown.md @@ -30,10 +30,14 @@ Using these buttons means you don't have to remember the matching Markdown synta Clicking the **Go full screen** button in the top-right of the editor enters a distraction-free, full-screen mode where you can focus exclusively on what you're writing. ### Indenting -Most rich text editors allow you to indent code using Tab and Shift Tab In the GitLab Markdown editor, these shortcuts move focus to the next and previous input field, respectively (just like any other form). Instead, you can indent and unindent Markdown using Control ] and Control [, respectively (⌘ ] and ⌘ [ on Mac). If you have multiple lines selected, you can indent all lines at once, just like in an IDE. +Most rich text editors allow you to indent code using Tab and Shift Tab. In the GitLab Markdown editor, these shortcuts move focus to the next and previous input field, respectively (just like any other form). + +To indent a line, use Control], ] on macOS. To unindent a line, use Control[, ] on macOS. + +To indent or unindent multiple lines at once, select the lines, then indent or unindent. ### Pasting Images -You can quickly add an image by copying the image and pasting it into the Markdown editor. This will automatically upload the image to GitLab and insert a link to it in the Markdown. This feature is tremendously useful when sharing screenshots — just print-screen, paste, and you're good to go! +You can quickly add an image by copying the image and pasting it into the Markdown editor. This will upload the image to GitLab and insert a link to it in the Markdown. This feature is very useful when adding screenshots. ## GitLab Flavored Markdown (GFM) diff --git a/doc/workflow/shortcuts.md b/doc/workflow/shortcuts.md index fd67ea8ce87..5e9eeb178f6 100644 --- a/doc/workflow/shortcuts.md +++ b/doc/workflow/shortcuts.md @@ -99,6 +99,16 @@ You can see GitLab's keyboard shortcuts by using shift + ? | ----------------- | ----------- | | e | Edit wiki page| +## Markdown Editor + +| Keyboard Shortcut | Description | +| ----------------- | ----------- | +| Cmd/Ctrl + ] | Indent line/lines | +| Cmd/Ctrl + [ | Unindent line/lines | +| Cmd/Ctrl + z | Undo | +| Cmd/Ctrl + Shift + z | Redo | + + ## Web IDE | Keyboard Shortcut | Description | -- cgit v1.2.1