News for hackers. Stuff that matters.
Re:Benefits of using tmux – streamlining your development en... by pfranz on Tuesday November 08, 2016 @04:04PM (#12903927)
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.

Re:Benefits of using tmux – streamlining your development en... by kornish on Tuesday November 08, 2016 @04:23PM (#12904063)
What 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.

Re:Benefits of using tmux – streamlining your development en... by nilkn on Tuesday November 08, 2016 @04:41PM (#12904204)
I already use tmux and vim regularly but I'd definitely be interested in a blog post on this technique.
Re:Benefits of using tmux – streamlining your development en... by pfranz on Tuesday November 08, 2016 @05:48PM (#12904644)
Interesting 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.
Re:Benefits of using tmux – streamlining your development en... by kornish on Tuesday November 08, 2016 @06:08PM (#12904767)
Definitely. If you shoot me an email ([email protected]) 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.
Re:Benefits of using tmux – streamlining your development en... by greenshackle2 on Tuesday November 08, 2016 @04:23PM (#12904066)
I 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.