Hacker News new | ask | show | jobs
by _blz2 747 days ago
Most of the problems with zellij people have initially can be fixed if they write the config file from bottom up..just comment everything out and you'll get to your desired config in 15 minutes.

Use the 'clear-defaults=true' option for each mode and build the config.

E.g.resize mode for me looks like this

  resize clear-defaults=true {
        bind "Esc" { SwitchToMode "Normal"; }
        bind "h" { Resize "Increase Left"; }
        bind "j" { Resize "Increase Down"; }
        bind "k" { Resize "Increase Up"; }
        bind "l" { Resize "Increase Right"; }
    }

Normal mode:

  normal clear-defaults=true {

        // Quit/detach
        bind "Alt x" { Quit; }
        bind "Alt d" { Detach; }

        // Switch modes
        bind "Alt p" { SwitchToMode "pane"; }
        bind "Alt r" { SwitchToMode "resize"; }
        bind "Alt t" { SwitchToMode "tab"; }
        bind "Alt s" { SwitchToMode "scroll"; }
        bind "Alt m" { SwitchToMode "move"; }

        // new pane or resize pane
        bind "Alt n" { NewPane; }
        bind "Alt >" { Resize "Increase"; }
        bind "Alt <" { Resize "Decrease"; }

        // move between panes (moves tabs if at the last pane)
        bind "Alt h" { MoveFocusOrTab "Left"; }
        bind "Alt j" { MoveFocus "Down"; }
        bind "Alt k" { MoveFocus "Up"; }
        bind "Alt l" { MoveFocusOrTab "Right"; }

        // swap layouts
        bind "Alt {" { PreviousSwapLayout; }
        bind "Alt }" { NextSwapLayout; }

        bind "Alt 1" { GoToTab 1; }
        bind "Alt 2" { GoToTab 2; }
        bind "Alt 3" { GoToTab 3; }
        bind "Alt 4" { GoToTab 4; }
        bind "Alt 5" { GoToTab 5; }
    }
1 comments

a good tool should be usable without custom configs
No, it shouldn't.
If anyone believes this, they can't seriously be surprised when most people can't be bothered to learn their superior tool.

Most people's first experience with a new tool will be to launch it with the default configuration and get a feel for it. That is an abysmal experience with far too many tools, so people go back to what they were already comfortable with even if its potential is more limited.

There's some nuance here when distributions change the default config. For example, some distributions made vim act like vi by default, while others enabled a reasonable set of modern features. People can form completely different opinions of the vim experience based entirely on what distribution they happened to try it on first, and you can't exactly blame the users for that.