Skip to content

Commit cd34d57

Browse files
Niloth-pneiljp
authored andcommitted
keys: Improve descriptions of editor hotkeys.
- Remove the common prefix "jump [to]", mentioning the targets directly (shortens the length of the help text without a reduction in clarity) - Use "Start" instead of "Beginning" (consistent with existing uses) - Clarify that Shift+Left (and equivalent) includes the current word - Use the simpler "Swap" instead of "Transpose" - Consistently use "Previous" in descriptions Hotkeys document regenerated.
1 parent 49b67cc commit cd34d57

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

docs/hotkeys.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@
8787
## Editor: Navigation
8888
|Command|Key Combination|
8989
| :--- | :---: |
90-
|Jump to the beginning of line|<kbd>Ctrl</kbd> + <kbd>a</kbd> / <kbd>Home</kbd>|
91-
|Jump to the end of line|<kbd>Ctrl</kbd> + <kbd>e</kbd> / <kbd>End</kbd>|
92-
|Jump backward one word|<kbd>Meta</kbd> + <kbd>b</kbd> / <kbd>Shift</kbd> + <kbd>Left</kbd>|
93-
|Jump forward one word|<kbd>Meta</kbd> + <kbd>f</kbd> / <kbd>Shift</kbd> + <kbd>Right</kbd>|
94-
|Jump to the previous line|<kbd>Up</kbd> / <kbd>Ctrl</kbd> + <kbd>p</kbd>|
95-
|Jump to the next line|<kbd>Down</kbd> / <kbd>Ctrl</kbd> + <kbd>n</kbd>|
90+
|Start of line|<kbd>Ctrl</kbd> + <kbd>a</kbd> / <kbd>Home</kbd>|
91+
|End of line|<kbd>Ctrl</kbd> + <kbd>e</kbd> / <kbd>End</kbd>|
92+
|Start of current or previous word|<kbd>Meta</kbd> + <kbd>b</kbd> / <kbd>Shift</kbd> + <kbd>Left</kbd>|
93+
|Start of next word|<kbd>Meta</kbd> + <kbd>f</kbd> / <kbd>Shift</kbd> + <kbd>Right</kbd>|
94+
|Previous line|<kbd>Up</kbd> / <kbd>Ctrl</kbd> + <kbd>p</kbd>|
95+
|Next line|<kbd>Down</kbd> / <kbd>Ctrl</kbd> + <kbd>n</kbd>|
9696

9797
## Editor: Text Manipulation
9898
|Command|Key Combination|
@@ -105,6 +105,6 @@
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-
|Delete previous character (to left)|<kbd>Ctrl</kbd> + <kbd>h</kbd>|
109-
|Transpose characters|<kbd>Ctrl</kbd> + <kbd>t</kbd>|
108+
|Delete previous character|<kbd>Ctrl</kbd> + <kbd>h</kbd>|
109+
|Swap with previous character|<kbd>Ctrl</kbd> + <kbd>t</kbd>|
110110

zulipterminal/config/keys.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -322,32 +322,32 @@ class KeyBinding(TypedDict):
322322
},
323323
'BEGINNING_OF_LINE': {
324324
'keys': ['ctrl a', 'home'],
325-
'help_text': 'Jump to the beginning of line',
325+
'help_text': 'Start of line',
326326
'key_category': 'editor_navigation',
327327
},
328328
'END_OF_LINE': {
329329
'keys': ['ctrl e', 'end'],
330-
'help_text': 'Jump to the end of line',
330+
'help_text': 'End of line',
331331
'key_category': 'editor_navigation',
332332
},
333333
'ONE_WORD_BACKWARD': {
334334
'keys': ['meta b', 'shift left'],
335-
'help_text': 'Jump backward one word',
335+
'help_text': 'Start of current or previous word',
336336
'key_category': 'editor_navigation',
337337
},
338338
'ONE_WORD_FORWARD': {
339339
'keys': ['meta f', 'shift right'],
340-
'help_text': 'Jump forward one word',
340+
'help_text': 'Start of next word',
341341
'key_category': 'editor_navigation',
342342
},
343343
'PREV_LINE': {
344344
'keys': ['up', 'ctrl p'],
345-
'help_text': 'Jump to the previous line',
345+
'help_text': 'Previous line',
346346
'key_category': 'editor_navigation',
347347
},
348348
'NEXT_LINE': {
349349
'keys': ['down', 'ctrl n'],
350-
'help_text': 'Jump to the next line',
350+
'help_text': 'Next line',
351351
'key_category': 'editor_navigation',
352352
},
353353
'UNDO_LAST_ACTION': {
@@ -392,12 +392,12 @@ class KeyBinding(TypedDict):
392392
},
393393
'DELETE_LAST_CHARACTER': {
394394
'keys': ['ctrl h'],
395-
'help_text': 'Delete previous character (to left)',
395+
'help_text': 'Delete previous character',
396396
'key_category': 'editor_text_manipulation',
397397
},
398398
'TRANSPOSE_CHARACTERS': {
399399
'keys': ['ctrl t'],
400-
'help_text': 'Transpose characters',
400+
'help_text': 'Swap with previous character',
401401
'key_category': 'editor_text_manipulation',
402402
},
403403
'FULL_RENDERED_MESSAGE': {

0 commit comments

Comments
 (0)