3 ms·
Similar to that, I've seen a lot of blog posts about Tmux and Vim, but I've been itching to see one where they talk about day-to-day. When do they use vim-spli
by pfranz 10y ago
Similar to that, I've seen a lot of blog posts about Tmux and Vim, but I've been itching to see one where they talk about day-to-day. When do they use vim-split versus tmux pane, vim buffers versus tmux windows? I use both, but aren't very systematic...there's a bit of cognitive load when remembering which I'm using and using the different commands to navigate. You can't do diffs with panes and it's nice to use vim buffers instead of tmux windows when editing a series of files.
I imagine using a tiling window manager with tmux you'd have a similar issue. Sshing into a box you can launch tmux and have windows and splits inside, but you couldn't use your WM.
- kornish 10y agoWhat I do, and would recommend, is spin up vim or emacs as a daemon, then connect to it as a client in one or more tmux windows. That way, you can yank/put easily using the usual shortcuts from any tmux window to any tmux window. Then, it's usually easiest to only use intra-process pane splitting (keeping it all in vim or emacs) unless you need to do something that doesn't follow a perfect division, like: top half vim / bottom left vim / bottom right trailing logfile or something. More than happy to write a blog post, if you're interested.
- nilkn 10y agoI already use tmux and vim regularly but I'd definitely be interested in a blog post on this technique.
- pfranz 10y agoInteresting to run it as a daemon and connect. I'd be curious to see how you set it up and use it in practice. Whenever I use vim splits I'm almost always diffing left and right. So, nothing fancy.
- kornish 10y agoDefinitely. If you shoot me an email (hello@tedkornish.com) I'll let you know when the post is up. As a disclaimer, I use emacs with evil mode, not vim proper, so the command is just emacs --daemon=myproject Then it's just emacsclient -nw -s myproject ./directoryhere to connect, and the first part of that can be aliased away. Not 100% sure that vim has a good daemon/client mode, but I seem to recall something existing along those lines. It can be extremely useful to have multiple collections of editor panes set up, each in a different part of the codebase, and the ability to switch back and forth quickly with tmux - really helps for debugging and keeping organized.
- greenshackle2 10y agoI use a tiling WM with tmux and vim. I have three levels of windows/tabs. It's probably not optimal but I've gotten used to it. I basically always run all my terminals in a single tmux'd window, and run a single instance of vim. I use vim windows when I edit multiple files at a time.