I have the following setup for using comments:
(key-chord-define evil-normal-state-map "cc" 'comment-dwim-2)
This works fine. I can type cc to comment it out or comment out.
However, Web-mode works with an another function, because the comment syntax are differrent for languages like javascript or HTML. So I set up following keybinding for only web-mode in my setup:
(evil-define-key 'normal web-mode-map
(kbd "cc") 'web-mode-comment-or-uncomment
)
But with the setup above I cannot use other Evil keybindings like cw or ctf anymore, because the keybinding above disabled them. Any suggestion for a way to use keychord in the evil-define-key
, but for web-mode only? So that I can use another keys with operator c again, in web-mode only.