Set custom keybinding for specific Emacs mode

后端 未结 4 794
余生分开走
余生分开走 2021-01-30 03:15

Though I know how to set a global key-binding in Emacs, I find it hard to even Google out the code for a local (minor-mode specific) key-binding. For instance, I have this code

4条回答
  •  遥遥无期
    2021-01-30 03:46

    I use the following:

    (add-hook 'LaTeX-mode-hook
              (lambda () (local-set-key (kbd "C-0") #'run-latexmk)))
    

    to have a bind defined for LaTeX mode alone.

提交回复
热议问题