Live data from Hacker News

Tmux for Mere Mortals

zserge.com

21–30 of 171 posts

Re: Tmux for Mere Mortals

#21
post #16
post #5

> Now tmux feels like a regular desktop app and truly boosts the productivity in the terminal. What do you think? I think it's really nice. Well done! > Mod+V: split vertically > Mod+B: split horizontally (“bisect”) That's smart . I love it! % and " tend to feel... just weird. I can see the visual cue, but it's always been weird to me nonetheless.

Honestly, for me the split keys are just muscle memory at this point, same as 'hjkl' in Vim. Same with my prefix- I used backticks for the longest time, and now I use Ctrl-Space, but I generally don't think about it anymore. (Along the same lines, I screw up and occasionally type "jj" or ":wq" in message boxes out of force of habit from Vim.) It's weird- as I'm typing this comment, I tried issuing "Ctrl-Space %" a co…

> I screw up and occasionally type "jj" or ":wq" in message boxes out of force of habit from Vim

Oh, I do this all the time as well! Adding `alias :q=exit` to my zshrc and other tools where I can custom commands just made it beneficial for me instead of a hassle.

Re: Tmux for Mere Mortals

#22
post #11
post #8

I spend a lot of my time using VIM. About 6 months ago I started using tmux. I can honestly say I love it. It was a little rough at first but I just made a cheat sheet on a piece of paper the size of a business card. That helped a lot. The default keys start to feel okay just like with VIM. I don’t have any problem with people customizing tools however they want so this post is really great. Anything that lowers the…

Something cool to try is to blend your tmux bindings with your vim bindings: https://gist.github.com/mislav/5189704 Mislav Marohnić has a super nice method of moving between tmux splits and vim splits the same way so you don’t really get stuck thinking one split is actually the other. This would drive me crazy, but after a little hacking, my tmux/vim combo feels so nice and snappy.

When I first configured this it changed my life as a developer. I use eternal terminal + tmux + vim, and can connect to my "IDE" from any computer.

Re: Tmux for Mere Mortals

#23
post #4

What this author has settled on looks very similar to commonly used tiling window manager shortcuts (which should not be very surprising, because a lot of the constraints desired by the author apply to the other situation also). In fact, even more directly, the author is basically using TMUX as a the tiling window manager for their terminals. So, I guess the funny thing is, this gives a nice bunch of Tmux shortcuts,…

> What this author has settled on looks very similar to commonly used tiling window manager shortcuts

This is what really intrigued me about the article. Most are about remapping the prefix to something easier to type, or using more intuitive mappings, but removing the prefix altogether is different.

I think I might try it for a while. I'm kind of in two minds - on one hand it shortens common actions from a chorded prefix + a chord to a single chord. On the other hand, it makes it easier to clash with existing keybindings and modifiers (readline default bindings use alt/meta and ctrl, my i3 config uses super, other cli apps use ctrl...). It also means I need 2 sets of muscle memory, because I use tmux in many servers and such where I don't have the opportunity to add custom config.

> I guess the funny thing is, this gives a nice bunch of Tmux shortcuts, unless you're using a tiling WM for your system , in which case this is hopeless

Unless you use a different modifier for the tiling wm actions - eg. I use super + to namespace i3 bindings, which leaves alt/meta free for readline and others.

Re: Tmux for Mere Mortals

#24
post #8

I spend a lot of my time using VIM. About 6 months ago I started using tmux. I can honestly say I love it. It was a little rough at first but I just made a cheat sheet on a piece of paper the size of a business card. That helped a lot. The default keys start to feel okay just like with VIM. I don’t have any problem with people customizing tools however they want so this post is really great. Anything that lowers the…

People do seem to often complain about the tmux defaults or say their particular configuration is "sane" and the defaults are not. But if you look at changes people make or at requests made over the years, they are all over the place and there is rarely a single common consensus on how the defaults could be better. Even if you look at something like "tmux-sensible", it is maybe a dozen lines of changes, of which some are now obsolete, some have downsides that prevent them being the default , and some are obviously personal preference.

I did have new panes and windows default to the current working directory for a while, and I in fact do this in my own config, but there are security concerns and it was felt it was better that people have to configure it explicitly if they want it.

Re: Tmux for Mere Mortals

#25
post #10

Spent too much time wonking a tmux config only realizing it was never going to work how I liked. You can't have it all with the mouse no matter your settings, there will always be a compromise. It also doesn't help that no one cites the version of tmux they wrote their configs for, nor that the configs are not backwards compatible with all versions of tmux for all settings. It's really clunky, but I went from tmux to…

Yes, the mouse situation in tmux is catastrophic. As much as I love tmux, I wonder what would it take that the program respects the usual copy-paste conventions like all the rest of X programs. You need to do two things, that are apparently impossible when tmux has "mouse enabled": 1. select some text in your xterm so that it gets copied 2. middle click on the xterm and your copied text (possibly from other window, w…

it works pretty well if you're in vi mode, because the same key commands are used in vim for visual mode. so you end up just getting used to scrolling that way.

Re: Tmux for Mere Mortals

#26
After a few years in tmux, I actually moved back to just iterm2 (I'm always on osx). There are many new Iterm2 features over the last few years that make tmux unecessary IMO.

- Iterm2 can now restore sessions, even partially after a reboot (attempts to recreate workspaces). This was the main benefit of tmux for me.

- Iterm2 can also have a visual mode to browse your scrollback buffer, and there are some shortcuts similar to vim. This was the second main benefit of tmux for me.

- It's less keybindings to remember and configure.

- Iterm2 can better size your split panes. You can also change text size per pane. Useful for wide text.

- A bunch of other things that iterm2 does better when tmux is not open. Autocomplete. Paste history. Instant replay. Some of these are quite gimmicky TBH, but could be useful for some.

- Text, colors, etc... appear sharper without tmux. I think. There are antialiasing configs you can mess around with in Iterm2 at least.

- Shell integration. Jump to your last shell prompts in scrollback. Highlight all your prompts in all your panes. Then move to those panes with your mouse without clicking. Amazing.

Re: Tmux for Mere Mortals

#27
post #20

Earlier quoted context omitted.

Yes, the mouse situation in tmux is catastrophic. As much as I love tmux, I wonder what would it take that the program respects the usual copy-paste conventions like all the rest of X programs. You need to do two things, that are apparently impossible when tmux has "mouse enabled": 1. select some text in your xterm so that it gets copied 2. middle click on the xterm and your copied text (possibly from other window, w…

The top reason I did start using tmux was because of how you can select text with the keyboard in copy mode (like visual in vim mode). Then I got the plugin tmux-plugins/tmux-yank which adds "y" command to copy the text. Also works with selection by mouse. I've run this setup now for something like 5 years across multiple tmux versions and OSes (Ubuntu and Arch) without any hiccups. But then I think tmux is a tool ge…

> The top reason I did start using tmux was because of how you can select text with the keyboard in copy mode (like visual in vim mode). Then I got the plugin tmux-plugins/tmux-yank which adds "y" command to copy the text. Also works with selection by mouse.

Sure, but this is the internal "copy mode" of tmux, and is not useful to copy text in and out of your terminal.

Re: Tmux for Mere Mortals

#28
I have honestly never seen any big value in using tmux over screen. I do all the multiplexing in my window manager and I use tilix which allows me to sync commands over multiple sessions.

Re: Tmux for Mere Mortals

#29
Tmux is amazing, my only request is there be an option to name panes (with the names showing perpetually on top or bottom of the pane). Every time I ssh into an ec2 instance I can't remember what logs are showing in each pane!
Post reply on HN