1

I'm trying to rebind a key in insert mode for a major mode and I just can't seem to get it - I have in my .spacemacs

  (evil-define-key '(normal insert) rjsx-mode-map
    (kbd "C-d") 'rjsx-delete-creates-full-tag
    )
  (evil-define-key 'normal rjsx-mode-map
    (kbd "x") 'rjsx-delete-creates-full-tag
    )

and then when I do C-h k C-d to inspect the key inside of rjsx mode while in normal mode I get:

C-d runs the command rjsx-delete-creates-full-tag, which is an interactive
compiled Lisp function in ‘rjsx-mode.el’.

It is bound to x, C-d, <insert-state> C-d, <normal-state> x, <normal-state> C-d.

which is exactly what I expect and it works great, and I can see C-d, but then I switch into insert state and inspect the key and I get:

C-d runs the command delete-char (found in global-map), which is an interactive
built-in function in ‘C source code’.

It is bound to C-d.

What am I not doing right to get this bound in insert mode?

gone
  • 111
  • 2
  • Can you try same steps which I wrote here. I never failed by using this method. https://emacs.stackexchange.com/a/55607/8426 – itirazimvar Feb 25 '20 at 19:40

0 Answers0