roman / golden-ratio.el

Automatic resizing of Emacs windows to the golden ratio
MIT License
590 stars 38 forks source link

Golden ratio not working with Evil? #41

Closed ReneFroger closed 9 years ago

ReneFroger commented 9 years ago

For example I have bounded the keys nn to (evil-window-vsplit)

But there is no golden ratio. It will only be activated, when I turn on Helm in one of the windows.

Propably this is a bug, or Golden Ratio conflicts with Evil?

thierryvolpiatto commented 9 years ago

ReneFroger notifications@github.com writes:

For example I have bounded the keys nn to (evil-window-vsplit)

But there is no golden ratio. It will only be activated, when I turn on Helm in one of the windows.

Propably this is a bug, or Golden Ratio conflicts with Evil?

It is just that golden-ratio probably doesn't support evil-window-vsplit, I don't know how this is working, but if it doesn't use pop-to-buffer, golden-ratio will not run, but as soon as you switch to other buffer with e.g C-x o the window will be golden-ratio resized. Did you try adding evil-window-vsplit to golden-ratio-extra-commands ?

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

ReneFroger commented 9 years ago

@thierryvolpiatto Many thanks for your useful suggestion! I really like your support here, even when it's not your plugin. Thanks for that.

golden-ratio-extra-commands does the trick.

For future reference:

(golden-ratio-mode)

(setq golden-ratio-extra-commands (append golden-ratio-extra-commands '(evil-window-left evil-window-right evil-window-up evil-window-down buf-move-left buf-move-right buf-move-up buf-move-down window-number-select select-window select-window-1 select-window-2 select-window-3 select-window-4 select-window-5 select-window-6 select-window-7 select-window-8 select-window-9) ) )