开发者

remap emacs key

开发者 https://www.devze.com 2023-03-05 14:12 出处:网络
I would like to remap a key in emacs, for example { and i would it to trigger usual event. Example, i remapped alt + ( to get { and i would like, when i use a plugin like autopair to give me the assoc

I would like to remap a key in emacs, for example { and i would it to trigger usual event. Example, i remapped alt + ( to get { and i would like, when i use a plugin like autopair to give me the associated }. I tried this :

    (global-set-key [(alt \()] ( lambda () (interactive) (insert "{") ))

It inserts { correctly but does not trigger autopair hooks.

Is there a way开发者_开发技巧 to achieve it ?


Try (not tested):

(define-key key-translation-map (kbd "M-(") (kbd "{"))
0

精彩评论

暂无评论...
验证码 换一张
取 消