Skip to content

Commit 16dbd30

Browse files
committed
keys/docs: Make editor actions a help category.
Now that all editors support readline shortcuts, they've been grouped into their own category.
1 parent e32ae3e commit 16dbd30

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

docs/hotkeys.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@
8383
|Autocomplete @mentions, #stream_names, :emoji: and topics|<kbd>Ctrl</kbd> + <kbd>f</kbd>|
8484
|Cycle through autocomplete suggestions in reverse|<kbd>Ctrl</kbd> + <kbd>r</kbd>|
8585
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
86+
|Jump to the previous line|<kbd>Up</kbd> / <kbd>Ctrl</kbd> + <kbd>p</kbd>|
87+
|Jump to the next line|<kbd>Down</kbd> / <kbd>Ctrl</kbd> + <kbd>n</kbd>|
88+
|Clear compose box|<kbd>Ctrl</kbd> + <kbd>l</kbd>|
89+
90+
## Editor actions
91+
|Command|Key Combination|
92+
| :--- | :---: |
8693
|Jump to the beginning of line|<kbd>Ctrl</kbd> + <kbd>a</kbd>|
8794
|Jump to the end of line|<kbd>Ctrl</kbd> + <kbd>e</kbd>|
8895
|Jump backward one word|<kbd>Meta</kbd> + <kbd>b</kbd>|
@@ -95,7 +102,4 @@
95102
|Cut backwards to the start of the current word|<kbd>Ctrl</kbd> + <kbd>w</kbd>|
96103
|Paste last cut section|<kbd>Ctrl</kbd> + <kbd>y</kbd>|
97104
|Undo last action|<kbd>Ctrl</kbd> + <kbd>_</kbd>|
98-
|Jump to the previous line|<kbd>Up</kbd> / <kbd>Ctrl</kbd> + <kbd>p</kbd>|
99-
|Jump to the next line|<kbd>Down</kbd> / <kbd>Ctrl</kbd> + <kbd>n</kbd>|
100-
|Clear compose box|<kbd>Ctrl</kbd> + <kbd>l</kbd>|
101105

zulipterminal/config/keys.py

+16-15
Original file line numberDiff line numberDiff line change
@@ -323,77 +323,77 @@ class KeyBinding(TypedDict):
323323
'BEGINNING_OF_LINE': {
324324
'keys': ['ctrl a'],
325325
'help_text': 'Jump to the beginning of line',
326-
'key_category': 'msg_compose',
326+
'key_category': 'editor',
327327
},
328328
'END_OF_LINE': {
329329
'keys': ['ctrl e'],
330330
'help_text': 'Jump to the end of line',
331-
'key_category': 'msg_compose',
331+
'key_category': 'editor',
332332
},
333333
'ONE_WORD_BACKWARD': {
334334
'keys': ['meta b'],
335335
'help_text': 'Jump backward one word',
336-
'key_category': 'msg_compose',
336+
'key_category': 'editor',
337337
},
338338
'ONE_WORD_FORWARD': {
339339
'keys': ['meta f'],
340340
'help_text': 'Jump forward one word',
341-
'key_category': 'msg_compose',
341+
'key_category': 'editor',
342342
},
343343
'DELETE_LAST_CHARACTER': {
344344
'keys': ['ctrl h'],
345345
'help_text': 'Delete previous character (to left)',
346-
'key_category': 'msg_compose',
346+
'key_category': 'editor',
347347
},
348348
'TRANSPOSE_CHARACTERS': {
349349
'keys': ['ctrl t'],
350350
'help_text': 'Transpose characters',
351-
'key_category': 'msg_compose',
351+
'key_category': 'editor',
352352
},
353353
'CUT_TO_END_OF_LINE': {
354354
'keys': ['ctrl k'],
355355
'help_text': 'Cut forwards to the end of the line',
356-
'key_category': 'msg_compose',
356+
'key_category': 'editor',
357357
},
358358
'CUT_TO_START_OF_LINE': {
359359
'keys': ['ctrl u'],
360360
'help_text': 'Cut backwards to the start of the line',
361-
'key_category': 'msg_compose',
361+
'key_category': 'editor',
362362
},
363363
'CUT_TO_END_OF_WORD': {
364364
'keys': ['meta d'],
365365
'help_text': 'Cut forwards to the end of the current word',
366-
'key_category': 'msg_compose',
366+
'key_category': 'editor',
367367
},
368368
'CUT_TO_START_OF_WORD': {
369369
'keys': ['ctrl w'],
370370
'help_text': 'Cut backwards to the start of the current word',
371-
'key_category': 'msg_compose',
371+
'key_category': 'editor',
372372
},
373373
'PASTE_LAST_CUT': {
374374
'keys': ['ctrl y'],
375375
'help_text': 'Paste last cut section',
376-
'key_category': 'msg_compose',
376+
'key_category': 'editor',
377377
},
378378
'UNDO_LAST_ACTION': {
379379
'keys': ['ctrl _'],
380380
'help_text': 'Undo last action',
381-
'key_category': 'msg_compose',
381+
'key_category': 'editor',
382382
},
383383
'PREV_LINE': {
384384
'keys': ['up', 'ctrl p'],
385385
'help_text': 'Jump to the previous line',
386-
'key_category': 'msg_compose',
386+
'key_category': 'editor',
387387
},
388388
'NEXT_LINE': {
389389
'keys': ['down', 'ctrl n'],
390390
'help_text': 'Jump to the next line',
391-
'key_category': 'msg_compose',
391+
'key_category': 'editor',
392392
},
393393
'CLEAR_MESSAGE': {
394394
'keys': ['ctrl l'],
395395
'help_text': 'Clear compose box',
396-
'key_category': 'msg_compose',
396+
'key_category': 'editor',
397397
},
398398
'FULL_RENDERED_MESSAGE': {
399399
'keys': ['f'],
@@ -415,6 +415,7 @@ class KeyBinding(TypedDict):
415415
"msg_actions": "Message actions",
416416
"stream_list": "Stream list actions",
417417
"msg_compose": "Composing a Message",
418+
"editor": "Editor actions",
418419
}
419420

420421
ZT_TO_URWID_CMD_MAPPING = {

0 commit comments

Comments
 (0)