polymode / poly-org

Polymode for org-mode
56 stars 12 forks source link

Poly-org-mode-map and evil #14

Open srnnkls opened 5 years ago

srnnkls commented 5 years ago

Another observation:

poly-org-mode-map is applied only after switching to insert-state first? What is the best way to initially take care of precedence of poly-org-mode-map over evil-normal-state-map?

vspinu commented 5 years ago

I don't use evel so you will have to elaborate a bit more here. What's the problem in concrete terms?

srnnkls commented 5 years ago

The problem lies on the evil side (Why don’t keys defined with evil-define-key work (immediately)?).

The solution, after finding the right hook, was pretty straightforward, though:

(add-hook 'polymode-init-inner-hook
  #'evil-normalize-keymaps)

Sorry for bothering you!

vspinu commented 5 years ago

Should this be added as part of polymode compatibility layer instead? Others might find this useful as well right?

srnnkls commented 5 years ago

Of course, good idea.

srnnkls commented 5 years ago

Is 228 sufficient?