Defining specific mode bindings
Here is an example of how to do this:
(define-key clojure-mode-map (kbd "C-c r") 'cider-repl)
... where, of course, you have to replace it cider-replwith the specific command you want to link. Note that a quote 'before the command name is required.
Generalization:
(define-key <mode-map> <key-binding> '<command>)
key-chord -special instructions
, clojure-mode -
(add-hook 'clojure-mode-hook
(lambda () (key-chord-define clojure-mode-map "gj" 'cider-jack-in)))
: ,
clojure-mode-map , , , define-key, .
Emacs, , ,
(package-initialize)
- .emacs ( , package-install). , define-key - .
define-key hook, clojure-mode:
(defun clojure-set-up-key-bindings ()
(define-key clojure-mode-map (kbd "C-c r") 'cider-repl)
;; If necessary, add more calls to `define-key' here ...
)
(add-hook 'clojure-mode-hook 'clojure-set-up-key-bindings)