What does HackerNews think of vim-tmux-navigator?

Seamless navigation between tmux panes and vim splits

Language: Vim Script

#8 in Vim
Have you tried using https://github.com/christoomey/vim-tmux-navigator ? I use it for using to move between window/panes in vim/tmux.
I enjoy a terminal workflow, and helix doesn't actually have vim key bindings and many years of vim use is hard to switch.

EDIT: I'm also a tmux user and I can't live without a replacement for this plugin: https://github.com/christoomey/vim-tmux-navigator

Try the defaults until you get the basics. Look at the help file what you can do and what you need. After that you may want to implement seamless navigation between tmux panes and vim splits[0]. It really isn't a must but hey, it is very convenient for starters since they don't have any muscle memory for switching different splits.

After that maybe try to do same with AwesomeWM and that would be the ultimate navigation setup.

[0] https://github.com/christoomey/vim-tmux-navigator

To be honest, I hit my tl;dr threshold on the article, and skimmed only the high level. But speaking personally, I've used vim-tmux-navigator[1] and some related setup on the tmux side[2a][2b] for years, and it's really, really nice. CTRL-{H,J,K,L} navigates seamlessly between vim splits and tmux panes. It works flawlessly, and I wouldn't be without it.

Put another way, there are a lot of tmux users who take advantage of it for its terminal pane management features on a local environment rather than the classic remote-session stability use case ala screen. In that light, some kinds of integration make a ton of sense.

These days, it vaguely annoys me that I can't just navigate between OS (macOS, here) windows by keyboard just as seamlessly. I haven't quite gotten around to solving the problem with Hammerspoon[3] yet.

[1]: https://github.com/christoomey/vim-tmux-navigator

[2a]: https://github.com/jwhitley/dotfiles/blob/master/.tmux.conf#...

[2b]: https://github.com/jwhitley/tilde-local/blob/master/local/bi...

[3]: http://www.hammerspoon.org/

If you use vim + tmux this plugin[0] is super handy. It allows ctrl-h|j|k|l to switch between tmux or vim splits so you don't have to know whether it's a different terminal window or a vim split—just that you want to go right (for example).

[0] https://github.com/christoomey/vim-tmux-navigator

As far as Vim split navigation goes (and especially for those of us using Tmux), check out https://github.com/christoomey/vim-tmux-navigator.

It simply allows you to use Ctrl+{h,j,k,l} to navigate across Vim and Tmux splits as if they all were part of one cohesive IDE. Additionally, it spares you from having to maintain a configuration blob in your .vimrc thanks to being bundled as a plugin.

I don’t think it auto-creates splits, though.

vim-tmux-navigator[0] is probably the best thing I've installed in my terminal for transparently moving between splits. Using it has allowed switching splits to become so thoughtless that it's automatic as I move my eyes.

[0] https://github.com/christoomey/vim-tmux-navigator

I use iTerm2 and neovim as well and find tmux really beneficial for two reasons:

1. https://github.com/christoomey/vim-tmux-navigator. I use ctrl-h/j/k/l to navigate vim splits, and with vim-tmux-navigator, I can seamlessly move between splits and tmux panes. It's really nice.

2. Project management. I use a separate instance of vim per project I'm working on, and each instance corresponds to a tmux window. I have a no-prefix bind on ctrl-f that brings up the choose-window command, so I can navigate between projects with `ctrl-f `. I haven't found a solution to switch between projects in a single vim instance that is as fast this.

> That is what exactly?

For me, it is that I have a package like https://github.com/christoomey/vim-tmux-navigator

I can seamlessly move across splits in either vim or tmux without worrying which program started the splits.

I was a long time tmux user while on mac. Since I've swapped to arch and i3 I don't use tmux at all, and just use the WM. I basically live in terminals nowadays and I've not really missed tmux. The thing I really do miss is vim-tmux-navigator.

https://github.com/christoomey/vim-tmux-navigator.

A convert! (Score!) To make navigating Vim and tmux splits more palatable, I highly recommend this plugin: https://github.com/christoomey/vim-tmux-navigator
Holy cow, I'm so dumb.

I have "ctrl-(hjkl)" mapped using https://github.com/christoomey/vim-tmux-navigator so I have an extremely easy time navigating between splits in terminal vim. I tried like hell to get "ctrl-(hjkl)" to work in IntelliJ. I eventually gave up and decided to just start clicking the panes like a caveman. It never even crossed my mind to try the original bindings.

Thank you.

> One tweak I can't live without is having the same key bindings to seamlessly switch between tmux panes and Vim split windows.

YES, THIS! Setting up directional pane navigation to work with both tmux and vim panes as first-class entities was a huge workflow boon for me as well. It was a significant change that helped kick my setup over into vim+tmux+zsh as IDE vs. merely a collection of separate parts.

It's worth noting that some relevant bits of @mislav's stuff has been packaged up nicely as a Vim plugin:

https://github.com/christoomey/vim-tmux-navigator

I also just noted that @tarruda (of neovim fame) chimed in on @mislav's gist with his own independently created version of the Vim-side of things. It looks worth comparing some of the implementation details from @tarruda's work, he's done some stuff to eliminate redraws in Vim, etc.

Wonderful, looks like someone (@mislav and @christoomey) has already shaved this yak for me:

https://github.com/christoomey/vim-tmux-navigator

"Seamless navigation between tmux panes and vim splits"

So great. Off to check another random side-project off the list...