Skip to content

Commit f4ef66b

Browse files
committed
keys/docs: Re-order the editor hotkeys.
Group related keybindings by their categories. Sort the keybindings within a category.
1 parent ec95fc0 commit f4ef66b

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

docs/hotkeys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@
9797
## Editor: Text Manipulation
9898
|Command|Key Combination|
9999
| :--- | :---: |
100-
|Delete previous character (to left)|<kbd>Ctrl</kbd> + <kbd>h</kbd>|
101-
|Transpose characters|<kbd>Ctrl</kbd> + <kbd>t</kbd>|
100+
|Undo last action|<kbd>Ctrl</kbd> + <kbd>_</kbd>|
101+
|Clear text box|<kbd>Ctrl</kbd> + <kbd>l</kbd>|
102102
|Cut forwards to the end of the line|<kbd>Ctrl</kbd> + <kbd>k</kbd>|
103103
|Cut backwards to the start of the line|<kbd>Ctrl</kbd> + <kbd>u</kbd>|
104104
|Cut forwards to the end of the current word|<kbd>Meta</kbd> + <kbd>d</kbd>|
105105
|Cut backwards to the start of the current word|<kbd>Ctrl</kbd> + <kbd>w</kbd> / <kbd>Meta</kbd> + <kbd>Backspace</kbd>|
106106
|Cut the current line|<kbd>Meta</kbd> + <kbd>x</kbd>|
107107
|Paste last cut section|<kbd>Ctrl</kbd> + <kbd>y</kbd>|
108-
|Undo last action|<kbd>Ctrl</kbd> + <kbd>_</kbd>|
109-
|Clear text box|<kbd>Ctrl</kbd> + <kbd>l</kbd>|
108+
|Delete previous character (to left)|<kbd>Ctrl</kbd> + <kbd>h</kbd>|
109+
|Transpose characters|<kbd>Ctrl</kbd> + <kbd>t</kbd>|
110110

zulipterminal/config/keys.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,16 @@ class KeyBinding(TypedDict):
287287
'excluded_from_random_tips': True,
288288
'key_category': 'msg_actions',
289289
},
290+
'FULL_RENDERED_MESSAGE': {
291+
'keys': ['f'],
292+
'help_text': 'Show/hide full rendered message (from message information)',
293+
'key_category': 'msg_actions',
294+
},
295+
'FULL_RAW_MESSAGE': {
296+
'keys': ['r'],
297+
'help_text': 'Show/hide full raw message (from message information)',
298+
'key_category': 'msg_actions',
299+
},
290300
'STREAM_INFO': {
291301
'keys': ['i'],
292302
'help_text': 'Show/hide stream information & modify settings',
@@ -340,14 +350,24 @@ class KeyBinding(TypedDict):
340350
'help_text': 'Jump forward one word',
341351
'key_category': 'editor_navigation',
342352
},
343-
'DELETE_LAST_CHARACTER': {
344-
'keys': ['ctrl h'],
345-
'help_text': 'Delete previous character (to left)',
353+
'PREV_LINE': {
354+
'keys': ['up', 'ctrl p'],
355+
'help_text': 'Jump to the previous line',
356+
'key_category': 'editor_navigation',
357+
},
358+
'NEXT_LINE': {
359+
'keys': ['down', 'ctrl n'],
360+
'help_text': 'Jump to the next line',
361+
'key_category': 'editor_navigation',
362+
},
363+
'UNDO_LAST_ACTION': {
364+
'keys': ['ctrl _'],
365+
'help_text': 'Undo last action',
346366
'key_category': 'editor_text_manipulation',
347367
},
348-
'TRANSPOSE_CHARACTERS': {
349-
'keys': ['ctrl t'],
350-
'help_text': 'Transpose characters',
368+
'CLEAR_MESSAGE': {
369+
'keys': ['ctrl l'],
370+
'help_text': 'Clear text box',
351371
'key_category': 'editor_text_manipulation',
352372
},
353373
'CUT_TO_END_OF_LINE': {
@@ -380,36 +400,16 @@ class KeyBinding(TypedDict):
380400
'help_text': 'Paste last cut section',
381401
'key_category': 'editor_text_manipulation',
382402
},
383-
'UNDO_LAST_ACTION': {
384-
'keys': ['ctrl _'],
385-
'help_text': 'Undo last action',
403+
'DELETE_LAST_CHARACTER': {
404+
'keys': ['ctrl h'],
405+
'help_text': 'Delete previous character (to left)',
386406
'key_category': 'editor_text_manipulation',
387407
},
388-
'PREV_LINE': {
389-
'keys': ['up', 'ctrl p'],
390-
'help_text': 'Jump to the previous line',
391-
'key_category': 'editor_navigation',
392-
},
393-
'NEXT_LINE': {
394-
'keys': ['down', 'ctrl n'],
395-
'help_text': 'Jump to the next line',
396-
'key_category': 'editor_navigation',
397-
},
398-
'CLEAR_MESSAGE': {
399-
'keys': ['ctrl l'],
400-
'help_text': 'Clear text box',
408+
'TRANSPOSE_CHARACTERS': {
409+
'keys': ['ctrl t'],
410+
'help_text': 'Transpose characters',
401411
'key_category': 'editor_text_manipulation',
402412
},
403-
'FULL_RENDERED_MESSAGE': {
404-
'keys': ['f'],
405-
'help_text': 'Show/hide full rendered message (from message information)',
406-
'key_category': 'msg_actions',
407-
},
408-
'FULL_RAW_MESSAGE': {
409-
'keys': ['r'],
410-
'help_text': 'Show/hide full raw message (from message information)',
411-
'key_category': 'msg_actions',
412-
},
413413
}
414414
# fmt: on
415415

0 commit comments

Comments
 (0)