xremap/example/emacs.yml

61 lines
1.6 KiB
YAML
Raw Normal View History

2022-01-01 05:43:16 +00:00
# Credit: https://github.com/mooz/xkeysnail/blob/bf3c93b4fe6efd42893db4e6588e5ef1c4909cfb/example/config.py#L62-L125
keymap:
- name: Emacs
remap:
# Cursor
C-b: { with_mark: left }
C-f: { with_mark: right }
C-p: { with_mark: up }
C-n: { with_mark: down }
# Forward/Backward word
M-b: { with_mark: C-left }
M-f: { with_mark: C-right }
# Beginning/End of line
C-a: { with_mark: home }
C-e: { with_mark: end }
# Page up/down
M-v: { with_mark: pageup }
C-v: { with_mark: pagedown }
# Beginning/End of file
M-Shift-comma: { with_mark: C-home }
M-Shift-dot: { with_mark: C-end }
# Newline
C-m: enter
C-j: enter
C-o: [enter, left]
# Copy
C-w: [C-x, { set_mark: false }]
M-w: [C-c, { set_mark: false }]
C-y: [C-v, { set_mark: false }]
# Delete
C-d: [delete, { set_mark: false }]
M-d: [C-delete, { set_mark: false }]
# Kill line
C-k: [Shift-end, C-x, { set_mark: false }]
# Undo
C-slash: [C-z, { set_mark: false }]
C-Shift-ro: C-z
# Mark
C-space: { set_mark: true }
# Search
C-s: F3
C-r: Shift-F3
M-Shift-5: C-h
# Cancel
C-g: [esc, { set_mark: false }]
# C-x YYY
C-x:
remap:
# C-x h (select all)
h: [C-home, C-a, { set_mark: true }]
# C-x C-f (open)
C-f: C-o
# C-x C-s (save)
C-s: C-s
# C-x k (kill tab)
k: C-f4
# C-x C-c (exit)
C-c: C-q
# C-x u (undo)
u: [C-z, { set_mark: false }]