zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.2k stars 644 forks source link

Efficient keys #3340

Open rgzntrade opened 5 months ago

rgzntrade commented 5 months ago

Various home keys enter different modes, and shortcuts that are not in that mode should not take effect. Similar to vim/nvim's mode. This has the advantage of simplifying shortcut key entry. Use the lock key as a LEADER key, using pane as an example. Pressing p directly enters pane mode, then p no longer works under pane, unless p does something else in pane. The point is that other keys no longer work in the current mode.

imsnif commented 5 months ago

What is this issue about? I'm afraid I don't understand.

rgzntrade commented 5 months ago

这个问题是关于什么的?恐怕我不明白。

As an example,

  1. the shortcut for locking is set to ctrl+b.
  2. The shortcut for pane mode is p,
  3. the shortcut for creating a pane in pane is p. From the locked state,
  4. press ctrl+b to enter the normal state.
  5. Pressing p enters pane mode
  6. pressing p creates a pane. Pressing p again after entering pane mode does not re-enter the pane, and pressing ctrl+b does not lock it.

    In pane mode only the shortcuts under the pane will work, the shortcuts under the pane are either your own or shared.