diff --git a/help/code-blocks.md b/help/code-blocks.md index d0a4fbb268..37029b1f63 100644 --- a/help/code-blocks.md +++ b/help/code-blocks.md @@ -22,10 +22,10 @@ formatting: 1. _(optional)_ Select the text you want to format. -1. Click the **Code** () icon at the +2. Click the **Code** () icon at the bottom of the compose box to insert code formatting. -1. _(optional)_ To enable syntax highlighting in a code bock, start typing the +3. _(optional)_ To enable syntax highlighting in a code bock, start typing the name of the desired programming language directly after the initial ` ``` `. Select the language from the auto-complete suggestions. @@ -34,6 +34,11 @@ formatting: You can also use the **Code** () icon to remove existing code formatting from the selected text. +!!! keyboard_tip "" + + You can also use Ctrl + Shift + C + to insert code formatting. + {tab|via-markdown} {!start-composing.md!} @@ -65,6 +70,11 @@ def fib(n): You can also use `~~~` to start code blocks, or just indent the code 4 or more spaces. +!!! keyboard_tip "" + + You can also use Ctrl + Shift + C + to insert code formatting. + {end_tabs} ## Examples diff --git a/help/format-your-message-using-markdown.md b/help/format-your-message-using-markdown.md index f2d53c86a2..2161688d68 100644 --- a/help/format-your-message-using-markdown.md +++ b/help/format-your-message-using-markdown.md @@ -91,8 +91,8 @@ below. !!! tip "" You can also use the **Code** () - button in the compose box to insert code formatting. - [Learn more](/help/code-blocks). + button or a keyboard shortcut (Ctrl + Shift + + C) to insert code formatting. [Learn more](/help/code-blocks). ## LaTeX diff --git a/help/keyboard-shortcuts.md b/help/keyboard-shortcuts.md index fa4c7c509c..b30b223052 100644 --- a/help/keyboard-shortcuts.md +++ b/help/keyboard-shortcuts.md @@ -141,6 +141,10 @@ in the Zulip app to add more to your repertoire as needed. * **Insert link**: `[Zulip website](https://zulip.org)` or Ctrl + Shift + L +* **Insert code formatting**: `` `code` `` or ```` ```code``` ```` or Ctrl + + Shift + C. + See [contextually appropriate code formatting](/help/code-blocks#insert-code-formatting). + * **Toggle preview mode**: Alt + P * **Cancel compose and save draft**: Esc or Ctrl +