Live data from Hacker News

Benefits of using tmux – streamlining your development environment

blog.bugsnag.com

71–80 of 172 posts

Re: Benefits of using tmux – streamlining your development environment

#72

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 used to use tools like that (tummy, teamocil, etc) but I've since discovered tmux-resurrect. It persists tmux sessions, windows, panes, and a whitelist of non-destructive commands like vim and top across reboots. Now my tmux sessions just organically grow and shrink as necessary and I never worry about having to recreate them. Of course I can see the case for combining both tools. If you have a lot of projects, and…

Does it save environment variables too?

Re: Benefits of using tmux – streamlining your development environment

#74
post #62

To me tmux, like a lot of tools, suffers from bad defaults that makes it less enjoyable to use. One example is not being able to scroll with a mouse. I usually find someone's tmux.conf online and use it, but always run into strange problems that I don't have the energy figuring out. My current conf suffers from the navigation bar going completely black when I try to rename a pane (can't see what i'm typing). Really w…

I was able to work out pasting into tmux from the system buffer, but no solutions I've seen for copying out of tmux have ever worked for me. So yes, that's a pretty basic usability issue.

Re: Benefits of using tmux – streamlining your development environment

#75

Earlier quoted context omitted.

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…

> 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.

The bottom bar is rendered by Vim with lightline [1]. The top bar is my tmux statusline, which I created by lightly customizing the output of tmuxline.vim [2].

I made my tmux.conf by customizing what I found on github, in particular @junegunn's dotfiles [3].

[1] https://github.com/itchyny/lightline.vim

[2] https://github.com/edkolev/tmuxline.vim

[3] https://github.com/junegunn/dotfiles

Re: Benefits of using tmux – streamlining your development environment

#76
post #65

Earlier quoted context omitted.

My own version of that command: ps -ef | grep 'thing' | awk '{print "kill -9 " $2}' | sh On most of my systems, I tend to make a shell script out of it and usually save it to /usr/local/bin/kll (and I don't care about grepping out grep because it doesn't seem to affect anything).

grrr.... pkill thing killall thing And then there's also pgrep instead of ps | grep

killall and pkill don't work if the thing I'm trying to grep for isn't the first word of the process string.

Let's say I'm trying to kill 'python foobar.py' but I don't want to kill 'python bazquux.py'. The only thing it'll respond to with killall is 'killall python', but then both of them will respond. So I have to grep out the parameter and then kill that, with: ps -ef | grep 'foobar.py' | awk '{print "kill -9 " $2}' | sh

Re: Benefits of using tmux – streamlining your development environment

#77
post #53

I use Byobu ( http://byobu.co/ ), which is a configuration layer over tmux. It's tmux with nicely packaged features.

As a screen user, Byobu is the best alternative. When I muscle-memoried screen commands the first time Byobu detected my actions and asked if my configuration ought to be changed to use screen bindings. Now that is UX done right.

Re: Benefits of using tmux – streamlining your development environment

#78
post #49

This is actually why I prefer Emacs. I can literally do all my development work in Emacs, with a full-featured shell (e-shell), directory explorer (dir-ed), REPL and full IDE for Clojure (CIDER). It's pretty great.

TRAMP really has changed the way I look at managing remote machines. Learning to set the remote path somewhat sanely has almost completely eliminated my usage of regular terminals.

I do wish it was a little better on latency sometimes. But overall this environment is ridiculously nice.

Re: Benefits of using tmux – streamlining your development environment

#79

If you use tmux and vim, and if you run tests, then you must look at janko-m/vim-test and vim-dispatch. Runs any test seamlessly in the background. Vim-dispatch also has the best intro video to anything ever ;) https://vimeo.com/63116209

Is vim dispatch still necessary now that there is native background processes?

Re: Benefits of using tmux – streamlining your development environment

#80
post #77
post #53

I use Byobu ( http://byobu.co/ ), which is a configuration layer over tmux. It's tmux with nicely packaged features.

As a screen user, Byobu is the best alternative. When I muscle-memoried screen commands the first time Byobu detected my actions and asked if my configuration ought to be changed to use screen bindings. Now that is UX done right.

Yes -- same for ctrl-a, its normal escape sequence. It detects emacs users typing ctrl-a and invites you to map it the way you want.
Post reply on HN