summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hanzel <mhanzel@gitlab.com>2019-07-24 09:16:44 +0200
committerMartin Hanzel <mhanzel@gitlab.com>2019-07-24 09:16:44 +0200
commit62af437b04878ee961b672934a5b7ea72e50fc4f (patch)
tree98c718e805b43384f57e470ef176df0bc7f06431
parent40a27630c643474e070d5a7485cba3bcc919a187 (diff)
downloadgitlab-ce-mh/editor-indents-doc.tar.gz
Update shortcuts docsmh/editor-indents-doc
-rw-r--r--app/views/help/_shortcuts.html.haml32
-rw-r--r--doc/user/markdown.md8
-rw-r--r--doc/workflow/shortcuts.md10
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 &#8984; ]
+ - else
+ %kbd ctrl ]
+ %td Indent
+ %tr
+ %td.shortcut
+ - if browser.platform.mac?
+ %kbd &#8984; [
+ - else
+ %kbd ctrl [
+ %td Unindent
+ %tr
+ %td.shortcut
+ - if browser.platform.mac?
+ %kbd &#8984; z
+ - else
+ %kbd ctrl z
+ %td Undo
+ %tr
+ %td.shortcut
+ - if browser.platform.mac?
+ %kbd &#8984; 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 <kbd>Tab</kbd> and <kbd>Shift Tab</kbd> 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 <kbd>Control ]</kbd> and <kbd>Control [</kbd>, respectively (<kbd>&#8984; ]</kbd> and <kbd>&#8984; [</kbd> 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 <kbd>Tab</kbd> and <kbd>Shift Tab</kbd>. 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 <kbd>Control</kbd><kbd>]</kbd>, <kbd>&#8984;</kbd><kbd>]</kbd> on macOS. To unindent a line, use <kbd>Control</kbd><kbd>[</kbd>, <kbd>&#8984;</kbd><kbd>]</kbd> 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 &mdash; 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 <kbd>shift</kbd> + <kbd>?</kbd>
| ----------------- | ----------- |
| <kbd>e</kbd> | Edit wiki page|
+## Markdown Editor
+
+| Keyboard Shortcut | Description |
+| ----------------- | ----------- |
+| <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>]</kbd> | Indent line/lines |
+| <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>[</kbd> | Unindent line/lines |
+| <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>z</kbd> | Undo |
+| <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>z</kbd> | Redo |
+
+
## Web IDE
| Keyboard Shortcut | Description |