In my emacs, tide-mode
has a key for jump-to-definition
of g d
I would like to define keys like this where i do not need a prefix (I use evil, so it would be in normal mode).
When I try this:
(global-set-key (kbd "g c c") 'comment-or-uncomment-region)
I get the message: Key sequence g c c starts with a non-prefix key
Is this possible?
g
org c
is not a prefix key. Seedefine-prefix-command
. See also emacs.stackexchange.com/a/13418 and emacs.stackexchange.com/q/58264.(define-key evil-motion-state-map (kbd "gcc") 'comment-or-uncomment-region)
.g
is already bound to a command in the global map, therefore (as the error tells you) it cannot also be a prefix.evil
key bindings, you should useevil
keymaps.