Emacs是一款强大的文本编辑器,它在macbook上的键盘映射可以通过修改配置文件来实现个性化定制。以下是一些常见的键盘映射配置:
;; 将Caps Lock键映射为Ctrl键
(setq mac-command-modifier 'control)
;; 修改其他键盘映射
(global-set-key (kbd "C-a") 'move-beginning-of-line)
(global-set-key (kbd "C-e") 'move-end-of-line)
(global-set-key (kbd "C-f") 'forward-char)
(global-set-key (kbd "C-b") 'backward-char)
(global-set-key (kbd "C-n") 'next-line)
(global-set-key (kbd "C-p") 'previous-line)
(global-set-key (kbd "C-d") 'delete-char)
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "C-k") 'kill-line)
(global-set-key (kbd "C-y") 'yank)
(global-set-key (kbd "C-s") 'isearch-forward)
(global-set-key (kbd "C-r") 'isearch-backward)
(global-set-key (kbd "C-g") 'keyboard-quit)
以上配置将Caps Lock键映射为Ctrl键,并修改了一些常用的Emacs快捷键映射。
领取专属 10元无门槛券
手把手带您无忧上云