1

I'm trying to simplify the way that I navigate between tabs in my terminal. Using ssh <workstation> -t 'tmux -CC attach', I can get iTerm to display tmux tabs as native macOS tabs (and therefore use the normal macOS keyboard shortcuts command-{ and command-} for tab navigation), and I'd like to go one step further and get vim tabs within tmux to be treated the same way.

Is there a way to make vim create tmux tabs, instead of its own native tab type?

Alternatively, is there a way to make tmux somehow know that when I hit command-{ or command-} in iTerm, that it should send a special key code to vim to make it switch tabs? (And ideally, is there any way to tell if I'm at the first or last tab in vim, so that I jump to the next tmux tab instead of wrapping to the next vim tab?)

(I've seen a way to integrate splits here, but if I understand right, that doesn't do anything related to tabs.)

Dan
  • 1,058
  • 7
  • 15

1 Answers1

0

The normal mode command gt, can also be obtained using the ex mode command :tn.

Similarly the normal mode command gT can also be obtained using the ex mode command :tp.

Ref: https://superuser.com/a/884981/658319

Next, you can map the Mac command key in iTerm2 using: https://stackoverflow.com/a/46018502/4752883

Let me know if you have any questions.

alpha_989
  • 993
  • 10
  • 14