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.
(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.
evil-define-keyis clobbering the
evil-changeoperator by binding the
cprefix (see analogous discussion in this thread). You probably want to do a mode-specific or buffer-local
key-chord-define(perhaps in a mode hook).
key-chord-definedoesn't have any notion of
insert-statein Evil. This makes it not possible to typing
ccfast in insert state.
evildoes, however, have local maps. Not sure if this will work, but try putting the following in your
(key-chord-define evil-normal-state-local-map "cc" #'web-mode-comment-or-uncomment).
evil-normal-state-local-mapis a free variable, that propbably doesn't exist. And I don't see how this could be solving my issue. It's that the
ccdoes disable the