Skip to content

Commit

Permalink
Use macOS styleguide (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Nov 23, 2022
1 parent 4b2c552 commit e1778d4
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Inspections allow highlighting of issues in the editor.

They also allow for quick fixes that the user can select using [.windows.linux]#kbd:[Ctrl+Enter]# [.macos]#kbd:[⌘+Enter]#.
They also allow for quick fixes that the user can select using [.windows.linux]#kbd:[Ctrl+Enter]# [.macos]#kbd:[⌘]#.

== How Inspections work

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@ Example:
--
* `++[.windows]#kbd:[Alt+F7]#++`
* `++[.linux]#kbd:[Alt+Shift+7]#++`
* `++[.macos]#kbd:[⌥+F7]#++`
* `++[.macos]#kbd:[⌥ F7]#++`
--
+
displays as
+
--
* kbd:[Alt+F7] (Windows)
* kbd:[Alt+Shift+7] (Linux)
* kbd:[⌥+F7] (macOS)
* kbd:[⌥ F7] (macOS)
--
+
The UI theme displays an operating switcher which tries to auto-detect the operating system of the visitor, which will then show only the shortcuts relevant to the selected operating system.
Therefore, always put all three operating systems into the docs.
+
As per the https://developer.apple.com/design/human-interface-guidelines/inputs/keyboards/[Apple guidelines], there is no `+` but a space between the keys.

Use active voice::
Active voice: "`The preview displays the result`" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To learn more about how to bundle multiple Git repositories as one IntelliJ proj

=== Antora editor support

In the editor, the user can autocomplete filenames and references using [.windows.linux]#kbd:[Ctrl+Space]# [.macos]#kbd:[^+Space]# and can navigate to a folder or file using [.windows.linux]#kbd:[Ctrl+B]# [.macos]#kbd:[⌘+B]#.
In the editor, the user can autocomplete filenames and references using [.windows.linux]#kbd:[Ctrl+Space]# [.macos]#kbd:[^ Space]# and can navigate to a folder or file using [.windows.linux]#kbd:[Ctrl+B]# [.macos]#kbd:[⌘ B]#.

To allow auto-completion for components that reside in different Git repositories, consider using a xref:features/advanced/multimodule.adoc[multi-module project].

Expand Down
124 changes: 62 additions & 62 deletions doc/users-guide/modules/ROOT/pages/features/keymap.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@ https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA

| Basic code completion | [.windows.linux]#kbd:[Ctrl+Space]#

[.macos]#kbd:[⌃+Space]#
[.macos]#kbd:[⌃ Space]#

| Smart code completion | [.windows.linux]#kbd:[Ctrl+Shift+Space]#

[.macos]#kbd:[⌃+⇧+Space]#
[.macos]#kbd:[⌃Space]#

| Show intention actions and quick-fixes | [.windows.linux]#kbd:[Alt+Enter]#
| Show intention actions and quick-fixes | [.windows.linux]#kbd:[Alt]#

[.macos]#kbd:[⌘+Enter]#
[.macos]#kbd:[⌘]#

| Open corresponding tool window | [.windows.linux]#kbd:[Alt+0] ... kbd:[Alt+9]#

[.macos]#kbd:[⌘+0] ... kbd:[⌘+9]#
[.macos]#kbd:[⌘ 0] ... kbd:[⌘ 9]#

| Save all | [.windows.linux]#kbd:[Ctrl+S]#

[.macos]#kbd:[⌘+S]#
[.macos]#kbd:[⌘ S]#

| Open Settings dialog | [.windows.linux]#kbd:[Ctrl+Alt+S]#

[.macos]#kbd:[⌘+,]#
[.macos]#kbd:[⌘ ,]#

| Find Action | [.windows.linux]#kbd:[Ctrl+Shift+A]#

[.macos]#kbd:[⌘+⇧+A]#
[.macos]#kbd:[⌘A]#
|===

[caption=]
Expand All @@ -62,13 +62,13 @@ https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA

[.windows.linux]#kbd:[Ctrl+W]#

[.macos]#kbd:[⌥+Up]#
[.macos]#kbd:[⌥]#

| Shrink selection |

[.windows.linux]#kbd:[Ctrl+Shift+W]#

[.macos]#kbd:[⌥+Down]#
[.macos]#kbd:[⌥]#

| Toggle bold for the selected text | kbd:[*]
| Toggle emphasize for the selected text | kbd:[_]
Expand All @@ -81,124 +81,124 @@ https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA

| Show intention actions and quick-fixes | [.windows.linux]#kbd:[Alt+Enter]#

[.macos]#kbd:[⌥+Enter]#
[.macos]#kbd:[⌥]#

| Reformat code | [.windows.linux]#kbd:[Ctrl+Alt+L]#

[.macos]#kbd:[⌘+⌥+L]#
[.macos]#kbd:[⌘L]#

| Auto-indent line(s) | [.windows.linux]#kbd:[Ctrl+Alt+I]#

[.macos]#kbd:[⌃+⌥+I]#
[.macos]#kbd:[⌃I]#

| Indent/unindent selected lines | [.windows.linux]#kbd:[Tab] / kbd:[Shift+Tab]#

[.macos]#kbd:[Right] / kbd:[⇧+Right]#
[.macos]#kbd:[] / kbd:[⇧]#

| Cut current line to clipboard | [.windows.linux]#kbd:[Ctrl+X],kbd:[Shift+Delete]#

[.macos]#kbd:[⌘+X]#
[.macos]#kbd:[⌘ X]#

| Copy current line to clipboard | [.windows.linux]#kbd:[Ctrl+C],kbd:[Ctrl+Insert]#

[.macos]#kbd:[⌘+C]#
[.macos]#kbd:[⌘ C]#

| Paste from clipboard +
(text or images) | [.windows.linux]#kbd:[Ctrl+V],kbd:[Shift+Insert]#

[.macos]#kbd:[⌘+V]#
[.macos]#kbd:[⌘ V]#

| Move current line up/down | [.windows.linux]#kbd:[Ctrl+Shift+Up]/kbd:[Down]#
| Move current line up/down | [.windows.linux]#kbd:[Ctrl+Shift+Up]/kbd:[Ctrl+Shift+Down]#

[.macos]#kbd:[⇧+⌘+Up]/kbd:[Down]#
[.macos]#kbd:[⇧ ⌘ ↑]/kbd:[⇧ ⌘ ↓]#

| Duplicate current line | [.windows.linux]#kbd:[Ctrl+D]#

[.macos]#kbd:[⌘+D]#
[.macos]#kbd:[⌘ D]#

| Delete line at caret | [.windows.linux]#kbd:[Ctrl+Y]#

[.macos]#kbd:[⌘+Backspace]#
[.macos]#kbd:[⌘]#

| Smart line join | [.windows.linux]#kbd:[Ctrl+Shift+J]#

[.macos]#kbd:[⌃+⇧+J]#
[.macos]#kbd:[⌃J]#

| Smart line split | [.windows.linux]#kbd:[Ctrl+Enter]#

[.macos]#kbd:[⌘+Enter]#
[.macos]#kbd:[⌘]#

| Start new line | [.windows.linux]#kbd:[Shift+Enter]#

[.macos]#kbd:[⇧+Enter]#
[.macos]#kbd:[⇧]#

| Toggle case for word at caret or selected block | [.windows.linux]#kbd:[Ctrl+Shift+U]#

[.macos]#kbd:[⌘+⇧+U]#
[.macos]#kbd:[⌘U]#

| Delete to word end | [.windows.linux]#kbd:[Ctrl+Delete]#

[.macos]#kbd:[⌥+Backspace]#
[.macos]#kbd:[⌥]#

| Delete to word start | [.windows.linux]#kbd:[Ctrl+Backspace]#

[.macos]#kbd:[⌥+Delete]#
[.macos]#kbd:[⌥ Delete]#

| Close active editor tab | [.windows.linux]#kbd:[Ctrl+F4]#

[.macos]#kbd:[⌘+W]#
[.macos]#kbd:[⌘ W]#

| Basic code completion +
(for example file names) | [.windows.linux]#kbd:[Ctrl+Space]#

[.macos]#kbd:[^+Space]#
[.macos]#kbd:[^ Space]#

| Smart code completion +
(for example file names) | [.windows.linux]#kbd:[Ctrl+Shift+Space]#

[.macos]#kbd:[^+⇧+Space]#
[.macos]#kbd:[^Space]#

| Complete the statement +
(for example macros) | [.windows.linux]#kbd:[Ctrl+Shift+Enter]#

[.macos]#kbd:[⌘+⇧+Enter]#
[.macos]#kbd:[⌘Enter]#

| Quick documentation lookup | [.windows.linux]#kbd:[Ctrl+Q]#

[.macos]#kbd:[^+J]#
[.macos]#kbd:[^ J]#

| Brief Info | [.windows.linux]#kbd:[Ctrl+mouse]#

[.macos]#kbd:[⌘+mouse]#
[.macos]#kbd:[⌘] + mouse#

| Expand/collapse block or attribute | [.windows.linux]#kbd:[Ctrl+NumPad+] / kbd:[NumPad-]#

[.macos]#kbd:[⌘ + ++ + ++] / kbd:[⌘+-]#
[.macos]#kbd:[⌘ ++ + ++] / kbd:[⌘ -]#

| Expand/collapse all | [.windows.linux]#kbd:[Ctrl+Shift+NumPad+] / kbd:[NumPad-]#

[.macos]#kbd:[⌘ + ⇧ + ++ + ++] / kbd:[⌘ + ⇧+-]#
[.macos]#kbd:[⌘ ⇧ ++ + ++] / kbd:[⌘ -]#

| Comment/uncomment with line comment | [.windows.linux]#kbd:[Ctrl+/]#

[.macos]#kbd:[⌘+/]#
[.macos]#kbd:[⌘ /]#

| Comment/uncomment with block comment | [.windows.linux]#kbd:[Ctrl+Shift+/]#

[.macos]#kbd:[⌘ + ++⌥++ + /]#
[.macos]#kbd:[⌘ /]#

| Select till the end of a code block | [.windows.linux]#kbd:[Ctrl+Shift++]+]#

[.macos]#kbd:[⌘ + ⇧ + +]+]#
[.macos]#kbd:[⌘ +]+]#

| Select till the start of a code block | [.windows.linux]#kbd:[Ctrl+Shift++[+]#

[.macos]#kbd:[⌘ + ⇧ + +[+]#
[.macos]#kbd:[⌘ +[+]#

| Surround with... +
(Use it with `ad-tag-include` template in any language to add tags for includes.) | [.windows.linux]#kbd:[Ctrl+Alt+T]#

[.macos]#kbd:[⌘+⌥+T]#
[.macos]#kbd:[⌘T]#

|===

Expand All @@ -210,96 +210,96 @@ https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA
| Go to declaration +
Works also for file and class names in italics or monospace | [.windows.linux]#kbd:[Ctrl+B], kbd:[Ctrl+Click]#

[.macos]#kbd:[⌘+B], kbd:[⌘+Click]#
[.macos]#kbd:[⌘ B], kbd:[⌘] + click#

| Go to class | [.windows.linux]#kbd:[Ctrl+N]#

[.macos]#kbd:[⌘+O]#
[.macos]#kbd:[⌘ O]#

| Go to file | [.windows.linux]#kbd:[Ctrl+Shift+N]#

[.macos]#kbd:[⌘+⇧+O]#
[.macos]#kbd:[⌘O]#

| Go to symbol | [.windows.linux]#kbd:[Ctrl+Alt+Shift+N]#

[.macos]#kbd:[⌘+⌥+O]#
[.macos]#kbd:[⌘O]#

| Go to next/previous editor tab | [.windows.linux]#kbd:[Alt+Right/Left]#
| Go to next/previous editor tab | [.windows.linux]#kbd:[Alt+Right] / kbd:[Alt+Left]#

[.macos]#kbd:[^+Right/Left]#
[.macos]#kbd:[^ →] / kbd:[^ ←]#

| Go back to the previous tool window | kbd:[F12]
| Go to editor (from the tool window) | kbd:[Esc]
| Hide active or last active window | [.windows.linux]#kbd:[Shift+Esc]#

[.macos]#kbd:[⇧+Esc]#
[.macos]#kbd:[⇧ Esc]#

| Go to line | [.windows.linux]#kbd:[Ctrl+G]#

[.macos]#kbd:[⌘+L]#
[.macos]#kbd:[⌘ L]#

| Find in current file | [.windows.linux]#kbd:[Ctrl+F]#

[.macos]#kbd:[⌘+F]#
[.macos]#kbd:[⌘ F]#

| Find usages | [.windows]#kbd:[Alt+F7]#

[.linux]#kbd:[Alt+Shift+7]#

[.macos]#kbd:[⌥+F7]#
[.macos]#kbd:[⌥ F7]#

| Replace in current file | [.windows.linux]#kbd:[Ctrl+R]#

[.macos]#kbd:[⌘+R]#
[.macos]#kbd:[⌘ R]#

| Rename +
(for example ID or file name) | [.windows.linux]#kbd:[Shift+F6]#

[.macos]#kbd:[⇧+F6]#
[.macos]#kbd:[⇧ F6]#

| Recent files popup | [.windows.linux]#kbd:[Ctrl+E]#

[.macos]#kbd:[⌘+E]#
[.macos]#kbd:[⌘ E]#

| Navigate back/forward | [.windows.linux]#kbd:[Ctrl+Alt+Left/Right]#

[.macos]#kbd:[⌘+⌥+Left/Right]#
[.macos]#kbd:[⌘ ⌥ ←] / kbd:[⌘ ⌥ →]#

| Navigate to last edit location | [.windows.linux]#kbd:[Ctrl+Shift+Backspace]#

[.macos]#kbd:[⌘+⇧+Backspace]#
[.macos]#kbd:[⌘ ⇧ ⌫]#

| Select current file or symbol in any view | [.windows.linux]#kbd:[Alt+F1]#

[.macos]#kbd:[⌥+F1]#
[.macos]#kbd:[⌥ F1]#

| Go to declaration | [.windows.linux]#kbd:[Ctrl+B],kbd:[Ctrl+Click]#

[.macos]#kbd:[⌘+B],kbd:[⌘+Click]#
[.macos]#kbd:[⌘ B], kbd:[⌘] + click#

| File structure popup | [.windows.linux]#kbd:[Ctrl+F12]#

[.macos]#kbd:[⌘+F12]#
[.macos]#kbd:[⌘ F12]#

| Show navigation bar | [.windows.linux]#kbd:[Alt+Home]#

[.macos]#kbd:[⌥+Home]#
[.macos]#kbd:[⌥ Home]#

| Toggle bookmark | [.windows.linux]#kbd:[F11]#

[.macos]#kbd:[F3]#

| Toggle bookmark with mnemonic | [.windows.linux]#kbd:[Ctrl+F11]#

[.macos]#kbd:[⌥+F3]#
[.macos]#kbd:[⌥ F3]#

| Go to numbered bookmark | [.windows.linux]#kbd:[Ctrl+0] ... kbd:[Ctrl+9]#

[.macos]#kbd:[^0] ... kbd:[^9]#
[.macos]#kbd:[^ 0] ... kbd:[^ 9]#

| Show bookmarks | [.windows.linux]#kbd:[Shift+F11]#

[.macos]#kbd:[⌘+F3]#
[.macos]#kbd:[⌘ F3]#

|===

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ The main things to know about the editor are:
* When the user types the three letters kbd:[a]kbd:[d]kbd:[-], the editor suggests live templates for common AsciiDoc structures like lists, links and source code.
Continue typing to narrow down the list, use the up and down arrows to highlight an entry, and use kbd:[Enter] to select an entry.

* When typing a file name as part of an image macro or a reference, [.windows.linux]#kbd:[Ctrl+Space]# [.macos]#kbd:[^+Space]# shows a list of suggestions.
* When typing a file name as part of an image macro or a reference, [.windows.linux]#kbd:[Ctrl+Space]# [.macos]#kbd:[^ Space]# shows a list of suggestions.
Press kbd:[Tab] to replace the text in editor for the current reference or press kbd:[Enter] to insert the text in the editor.

* Using kbd:[Alt+Enter], the user can trigger context-specific features of the IDE, especially when there is an underlined text that indicate warnings and errors.
Those features range from creating a missing file to choose a correct word when there is a spelling or grammar mistake.

* After placing the cursor on an include-macro or a reference and pressing [.windows.linux]#kbd:[Ctrl+B]# [.macos]#kbd:[⌘+B]#, the IDE opens that file in a new editor tab.
* After placing the cursor on an include-macro or a reference and pressing [.windows.linux]#kbd:[Ctrl+B]# [.macos]#kbd:[⌘ B]#, the IDE opens that file in a new editor tab.

* To rename an attribute name, file name or reference, place the cursor on it and press [.windows.linux]#kbd:[Shift+F6]# [.macos]#kbd:[⇧+F6]#, and the IDE renames the reference in all places if the checkboxes are enabled in the dialog that pops up after the key was pressed.
* To rename an attribute name, file name or reference, place the cursor on it and press [.windows.linux]#kbd:[Shift+F6]# [.macos]#kbd:[⇧ F6]#, and the IDE renames the reference in all places if the checkboxes are enabled in the dialog that pops up after the key was pressed.

* To format the complete file or a selection of text, press [.windows.linux]#kbd:[Ctrl+Alt+L]# [.macos]#kbd:[⌘+⌥+L]#.
* To format the complete file or a selection of text, press [.windows.linux]#kbd:[Ctrl+Alt+L]# [.macos]#kbd:[⌘L]#.
The default configuration removes unnecessary blanks and applies the one-sentence-per line rule. See xref:features/advanced/reformatting.adoc[] for details.

To learn more about the editor's features, read the page xref:features/editor.adoc[].
Expand Down
Loading

0 comments on commit e1778d4

Please sign in to comment.