Live data from Hacker News

Benefits of using tmux – streamlining your development environment

blog.bugsnag.com

51–60 of 172 posts

Re: Benefits of using tmux – streamlining your development environment

#51
post #40
post #20

Earlier quoted context omitted.

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 b…

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 vi…

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 environment

#52
post #22

Earlier quoted context omitted.

That's one frustration I have with Tmux. I want mouse scrollback, but don't want the other mouse controls. If I remember correctly I would accidentally go into copy-mode when I click-dragged my mouse by accident.

That's the largest gripe I've had. Eventually, I got used to not relying on GUI scrollback - that actually sped things up for me. In a pinch I just `hotkey, [` to activate scroll, then just use my mouse or page-up & page-down. Even if you don't use tmux, get used to piping anything you'd want to read through `less`. It'll speed your workflow up.

I do use less sometimes, but sometimes I want to double check a command I typed a shirt while ago, or a command ends up outputting slightly more than I expected.

What I really want us an intelligent terminal, which attaches programming output to the program which produced it, let's me fold up long outputs, easily escape a long running program and store it output in a buffer for later checking, etc. But that seems annoyingly impossible.

Re: Benefits of using tmux – streamlining your development environment

#54

I use a tool called tummy ( https://github.com/minhajuddin/tummy full disclosure: built by me) which allows me to create a Tmuxfile per project. A typical file looks like this: session "liveform" directory "/home/minhajuddin/r/liveform/frontend" window "src", [ pane("vim TODO"), ] window "server-pry", [ pane("puma --port 3000 --config

I've been working on a Tmux manipulation library in Ruby as part of another project of mine, called Appear. Appear can raise any process to the front of your GUI (if your GUI is macOS), even if that process is in a disconnected Tmux session.

I'm also working on a little app that allows you to open files in Finder into console Tmux+Nvim.

Project: https://github.com/airbnb/appear

Tmux library source: https://github.com/airbnb/appear/blob/master/lib/appear/tmux...

Tmux library docs: http://www.rubydoc.info/gems/appear/Appear/Tmux

Example usage: https://github.com/airbnb/appear/blob/master/lib/appear/edit...

Nvim+Tmux file handler app: https://github.com/airbnb/appear/pull/11

Re: Benefits of using tmux – streamlining your development environment

#55

Earlier quoted context omitted.

I do that, not in a real "tiling window manager" but something very close: openbox, set to show no titlebars, and using shortcuts to title the windows to precise positions. I have 3 position: most of my screen on the left, a small vertical slice on the right, a smaller chunk underneath. If I want a titlebar for some application, I have a shortcut that will give the window a titlebar, and then I can move it around wit…

I use Openbox with some keybindings I picked up from ArchBang a while back, documented here [1]. tmux really comes into its own when you combine it with Vim and FZF [2]. I was initially hesitant to try tmux, but once I themed my tmux.conf and nailed down the keybindings, it became indispensable to me. I now use tmux as a basic organizational tool, and I always have at least one tmux session running on my desktop. I h…

Very interesting. I love vim, and find the screen/vim mix a little unpleasant. A few years ago I looked at tmux and concluded I did't really need it because screen already did everything I needed.

On https://camo.githubusercontent.com/a3919061a8cf1a25c7150e3e0... I see you seem to be passing some info from vim to tmux right bottom bar, the utf8 the encoding. In vim, I usually show my offset in the file there.

Can you tell me more about that? The only thing I hate with gnu screen is the space wasted on the bottom bar, and the need to have commands in backticks otherwise

Would yo suggest some good resource to theme tmux? (I use the thinkpad dedicated previous and next button, right above the left and right arrow keys to move between tabs in all tabbed applications. A pleasure to use. With shift, then change me to the previous/next desktop. With control, they move the currently focused window to the previous or next desktop, and change focus to that desktop too)

Re: Benefits of using tmux – streamlining your development environment

#56

I prefer opening tabs in my terminal window instead of this or other similar tools. It's not an exact replacement but I try to avoid learning and remembering new sets of keystrokes, and there are some other small UI wins in my opinion.

I agree with you. I like that I can rip off terminal tabs and move them around. Also move them to different virtual desktops. I tend to have a virtual desktop for each project I work on keeping things spatially separate that way. One piece of functionality missing form this setup is the "pre configured scripted dev environments" but i've used this tool

https://github.com/achiu/consular

to achieve that behavior

Re: Benefits of using tmux – streamlining your development environment

#57

When I was first introduced to tmux, I was really excited by having a terminal session I could reattach to. I was never able to get very deep into it though: (1) a lot of the time a single script would get me up to speed, (2) the extra layer of abstraction broke some stuff I was doing, and (3) I couldn't make heads or tails of a lot of the tmux documentation. I'll definitely take a second look at a lot of the things…

[deleted]

Re: Benefits of using tmux – streamlining your development environment

#59

When I was first introduced to tmux, I was really excited by having a terminal session I could reattach to. I was never able to get very deep into it though: (1) a lot of the time a single script would get me up to speed, (2) the extra layer of abstraction broke some stuff I was doing, and (3) I couldn't make heads or tails of a lot of the tmux documentation. I'll definitely take a second look at a lot of the things…

Half a dozen commands will get you 90% of the way there. After you've run tmux:

  ctrl+b followed by...
  % - split pane vertically
  " - split pane horizontally
  arrow keys - change pane you're typing in
  :new-window
  2 - switch to window 2
  x - kill pane
  d - detach
Command line arguments:

  tmux list-sessions
  tmux attach #will attach to last session by default
  tmux attach -t0 #will attach to session 0

Re: Benefits of using tmux – streamlining your development environment

#60
post #8

tmux git:(master) cloc . 189 text files. 184 unique files. 21 files ignored. github.com/AlDanial/cloc v 1.70 T=0.61 s (276.7 files/s, 83432.2 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- C 154 6714 5295 33234 C/C++ Header 8 528 543 3236 m4 1 56 0 612 awk 1 7 23…

I'm sorry if I'm missing something obvious, but what on earth is the point being made here?

They must be in (bad) management because they think lines of code are all there is to say.
Post reply on HN