Live data from Hacker News

Getting Started with Tmux

ittavern.com

141–150 of 160 posts

Re: Getting Started with Tmux

#142
post #137

This is my single most repeated action on a normal terminal window: * Clear and discard all scrollback history: Ctrl+Shift+K * Start a program run * Select all output: Ctrl+Shift+A * Copy it: Ctrl+Shift+C * Paste it somewhere else A total of 3 key combinations, that are now second nature. When I installed Tmux and tried to replicate this, I only found a sea of gotchas. No key binding by default for clearing the scrol…

Why are you copy pasting? I'm sure you know about stdout redirection, so I'm intrigued why this process is required. I'm guessing you're pasting logs into some gui system?

Re: Getting Started with Tmux

#143
post #137

This is my single most repeated action on a normal terminal window: * Clear and discard all scrollback history: Ctrl+Shift+K * Start a program run * Select all output: Ctrl+Shift+A * Copy it: Ctrl+Shift+C * Paste it somewhere else A total of 3 key combinations, that are now second nature. When I installed Tmux and tried to replicate this, I only found a sea of gotchas. No key binding by default for clearing the scrol…

After years of wrestling with configurations and dot files, I have finally realised that if you use a new tool, you should learn to use it properly and as intended by the author instead of trying to make it behave similar to some other tool you know well. At least for the first couple of years

Re: Getting Started with Tmux

#145
post #142
post #137

This is my single most repeated action on a normal terminal window: * Clear and discard all scrollback history: Ctrl+Shift+K * Start a program run * Select all output: Ctrl+Shift+A * Copy it: Ctrl+Shift+C * Paste it somewhere else A total of 3 key combinations, that are now second nature. When I installed Tmux and tried to replicate this, I only found a sea of gotchas. No key binding by default for clearing the scrol…

Why are you copy pasting? I'm sure you know about stdout redirection, so I'm intrigued why this process is required. I'm guessing you're pasting logs into some gui system?

I like starting from a clean slate and having only the output from last run of my program, so that's why the clearing screen step.

Then, the copy-paste is not done always, but it's done a lot when analyzing logs or debugging some issue. I prefer to read that output with the much more advanced filtering and searching tools that I have installed in my VSCode editor.

Re: Getting Started with Tmux

#147
post #68

Earlier quoted context omitted.

The main reason for having function keys is that you can have their labels on the screen, and that's intuitive. You can see it with IBM's CICS. Otherwise they are not that useful, and you can see it in eg laptops making Fn a secondary function, with the primary being adjustment of brightness or volume.

Oh ya, I'm not against function keys or anything, just not for me. Switching to vim 10+ years ago made all my RSI problems go away so now I just like to keep my fingers on the letter keys as much as possible. I don't even like stretching to number row when I can avoid it (though I do all the time, of course).

This sounds silly when I say it out loud, but reaching for the number row always felt like a chore. Of course, when I had to input numbers, I'd still have to reach for the number row. But when numbers were optional, say for vim bindings that take a `[count]`, I opted to look for alternatives instead.

A few months ago however, I bought a moonlander keyboard. Now, I've got one of it's keys that, when held, maps the right side to a full traditional numpad. Typing numbers is much more seamless now. Besides numbers, other keys that always broke my flow (looking at you right curly brace) are much easier to type.

Just thought I'd share as it really elevated my overall typing/vim experience.

Re: Getting Started with Tmux

#148
post #138

Favorite tmux conf change: new pane/window in cwd # split in pane cwd bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}"

Yes!! I've terrible memory ... these are my mnemonics instead

"|" -- for vertical split

"-" -- for horizontal split

Re: Getting Started with Tmux

#149

As a heavy GNU Screen user for the last 2 decades it’s always in the back of my mind if I should be switching to tmux. Maybe there is a compatibility mode. For those who switched from screen what was the biggest benefit?

I like the ergonomics of tmux, but one thing I like about screen is it works as a terminal for serial devices. It's something I use for connecting to my HP and Cisco switches; also Raspberry Pi and Beaglebone boards. Tmux doesn't do that.

Re: Getting Started with Tmux

#150
post #97

Earlier quoted context omitted.

As an alternative for vertical splitting, using _ (instead of -) means both types of splitting require a `shift` which keeps it a little more symmetrical if that's how your brain works!

Depends on your keyboard layout. On my (Finnish) keyboard, | requires alt.

I switched from a German layout to a US layout, mainly because of objective-c with its []. Most default key bindings feel natural that way.
Post reply on HN