hiasr / vim-zellij-navigator

90 stars 6 forks source link

Alt hjkl move between panes instead of resizing #10

Open steakhutzeee opened 6 months ago

steakhutzeee commented 6 months ago

Hi,

I'm able to move between panes but not able to resize them. Looks like I've some conflict with the base keybinding because Alt hjkl just move between panes.

Ideas how can I fix? Thanks!

steakhutzeee commented 6 months ago

I put the following at the top of my config file:

keybinds {
    unbind "Alt h" "Alt j" "Alt k" "Alt l"

Now I do not see them mentioned in zellij UI for pane focus moving, but hitting Alt hjkl does nothing, and screen does not flashes. Instead it's just like I'm hitting enter, and a new console line pops out.

hiasr commented 6 months ago

Could you attach your full (relevant) config? Then I can try to reproduce with that.

steakhutzeee commented 6 months ago

Sure, here is my zellij config https://gist.github.com/steakhutzeee/f88fd14bc4f8a39f569c758b417df08b and here is the nvim plugin https://gist.github.com/steakhutzeee/bd3c24917580ba864fcefbf3d2c625d5

ibrokemypie commented 2 months ago

Experiencing the same thing here

hiasr commented 1 month ago

Is it possible that you didn't bind the resize keybindings? It is indeed quite unclear from the Readme. Could you try with a config similar to this? I will also update the docs to make this more clear.

keybinds {
        bind "Ctrl h" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "left";
            };
        }

        bind "Ctrl j" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "down";
            };
        }

        bind "Ctrl k" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "up";
            };
        }

        bind "Ctrl l" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "right";
            };
        }

        bind "Alt h" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "resize";
                payload "left";
            };
        }

        bind "Alt j" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "resize";
                payload "down";
            };
        }

        bind "Alt k" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "resize";
                payload "up";
            };
        }

        bind "Alt l" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/download/0.2.1/vim-zellij-navigator.wasm" {
                name "resize";
                payload "right";
            };
        }
}