docs: Add code span shortcut.

This commit is contained in:
Aditya Bajaj 2024-04-12 23:34:17 +08:00
parent 6c7b7665ea
commit 07a0cd8690
3 changed files with 18 additions and 4 deletions

View File

@ -22,10 +22,10 @@ formatting:
1. _(optional)_ Select the text you want to format.
1. Click the **Code** (<i class="zulip-icon zulip-icon-code"></i>) icon at the
2. Click the **Code** (<i class="zulip-icon zulip-icon-code"></i>) 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** (<i class="zulip-icon zulip-icon-code"></i>)
icon to remove existing code formatting from the selected text.
!!! keyboard_tip ""
You can also use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>C</kbd>
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 <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>C</kbd>
to insert code formatting.
{end_tabs}
## Examples

View File

@ -91,8 +91,8 @@ below.
!!! tip ""
You can also use the **Code** (<i class="zulip-icon zulip-icon-code"></i>)
button in the compose box to insert code formatting.
[Learn more](/help/code-blocks).
button or a keyboard shortcut (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> +
<kbd>C</kbd>) to insert code formatting. [Learn more](/help/code-blocks).
## LaTeX

View File

@ -141,6 +141,10 @@ in the Zulip app to add more to your repertoire as needed.
* **Insert link**: `[Zulip website](https://zulip.org)` or <kbd>Ctrl</kbd> +
<kbd>Shift</kbd> + <kbd>L</kbd>
* **Insert code formatting**: `` `code` `` or ```` ```code``` ```` or <kbd>Ctrl</kbd> +
<kbd>Shift</kbd> + <kbd>C</kbd>.
See [contextually appropriate code formatting](/help/code-blocks#insert-code-formatting).
* **Toggle preview mode**: <kbd>Alt</kbd> + <kbd>P</kbd>
* **Cancel compose and save draft**: <kbd>Esc</kbd> or <kbd>Ctrl</kbd> +