I have 2 screens of difference sizes, and I am a Neovim user (with Tmux, iTerm2).

I would like to hack a way so that I can have a consistent way to "switch to the pane on the right of this pane", because now I have to be aware that I need to Cmd+` to switch between windows.

If I do not use screen as separate spaces, so that I can spread the whole terminal across screens, it would then affect the pane even distribution shortcut <C-w>=. Also, due to difference sizes of the screens, a rectangular window doesn't make good use of both screens.

Please advise.

Bonus is if that works with vim-tmux-navigator

  • 1
    What are you switching between? You right screen/pane, but neither is vim terminology. Are you switching between iTerm window? Or you want something that works for all combinations (left and right) of vim window/tmux pane/iTerm app window?
    – D. Ben Knoble
    Apr 27, 2021 at 20:10
  • Yeah so I think this is about having two iTerm windows in two screens. Do you have one instance of Vim running on each of them and in some cases you want to trigger a Vim mapping to control the other Vim from the other window, is that it? Or do you want a Vim mapping that can execute the equivalent of Ctrl-` to switch to the next terminal window? Not sure if something like that actually exists...
    – filbranden
    Apr 28, 2021 at 8:35
  • 1
    @filbranden Got me correct. I am switching between Vims within terminal windows, and I wonder if it is doable like vim-tmux-navigator. If phrased as a vim script question, then the question would be like "can I detect if I am on the rightmost split in a vim buffer" so I may write code to handle my use case. I asked this way as there may be existing plugins / other solutions.
    – Sunny Pun
    Apr 30, 2021 at 2:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy