Making Tmux Better AND Beautiful -- here’s how
HTML-код
- Опубликовано: 9 июн 2024
- X: / typecraft_dev
🚨Tmux for newbs - Episode 2🚨
Tmux is an amazing tool that has skyrocketed my productivity as a programmer. In this series, I want to teach you all about tmux. From how it works to how I use it day-to-day, and how to make it look AWESOME with some sweet configuration.
In this episode of Tmux for Newbs, we're going take it to the next level.
From better keyboard ergonomics to more sensible keybindings, we will take Tmux to the next level. Then we're going to make it look BEAUTIFUL.
Pull up a chair - let's get after it.
00:00 Introduction
00:51 Recap
01:05 Tmux.conf
01:33 Reloading Tmux.conf keybinding
02:01 Prefix Keybinding
03:23 Mouse Support
03:50 Pane navigation keybindings
05:52 Tmux Plugin Manager
07:34 Make it BEAUTIFUL
10:05 Recap - Наука
thanks nerd
A configuration I learned recently is to use `set -g base-index 1` which make the windows start by the index 1 instead of 0, so it is easier to change windows with +window_index. Another one is `set -g renumber-windows`.
I love that one. I think it is also part of tmux-sensible.
I think the pace of your videos is spot on not too fast not too slow, just right
Been in this software game for 25 years now and your videos are hands down S tier. Clear and concise and just incredible. Are your configs available for folks? Either way, great stuff. Cheers
thanks so much!! thats really great to hear. And yes I need to get some things together and I'll share configs. Thanks again!
Amazing! I have been using Oh My Tmux config for a long time, but these configs make Tmux look way more beautiful!
Now I´m waiting for you next video! Thx
Love the neck tattoos that change with the theme of the video. Nice touch
What a great video series! I’ve basically recreated your setup in nix - with the ability for everything to re-theme itself if I change color scheme
Good stuff! Thank you, I picked up a couple of things for my own tmux config
Hi great and helpful video's. I have been using tmux for a couple of years now, and still I got value from this vid. The only feedback I want to give is maybe add the links where you go to in the description :). Keep up the great work!
finally been waiting for part 2
I can’t believe a bonafide neck-beard like you don’t have a split keyboard yet.
(Thanks for the awesome tutorials and fantastic positive attitude. )
lol I’ve tried many of them but they wind up hurting my wrists more believe it or not. The best ergonomic change for me was a track ball mouse
these videos are the nice push I need to use tmux just a bit better - thanks!
You got me! I used to use Tokyo Night, but you're right-Catppuccin is really awesome. You've just earned a new subscriber!
Thanks, this is really simple and super useful.
Great channel, great videos, thank you a lot! Keep going, bro!
My tmux config got a good spring cleaning thanks to you, I removed some stuff that I never used and put more goodness into it. Nice music btw! I am just not sure about the status bar as i am usually on a laptop and tend to auto-hide the task bar and defend every pixel of free screen real estate. I will check if I can make the status bar smaller.
Yeah that makes sense and is up to you! Thanks for being a member!!
Brilliant tutorial thank you!
Great video! Here are some additional tips:
1. You can setup a vim auto command to source the tmux file on save
2. I like having tpm pointed at ~/.config/tmux since that’s where my config file is
3. I use macOS keybindings for my tmux workflow! Huge game changer and only requires a single keystroke (using command)
I’m looking forward to the next video, keep up the good work!
Hey man. How do you setup keybindings for macOS? I was not able to make it work with M (meta) to use a single keystroke.
I really like your videos. Keep going ❤️
If you say so!
dayum that last part the config 3 is lit, I would love to learn each of those config properties better, I could not find a short image or video demonstration of each property. Words are not enough on certain things.
Thanks! It’s awesome!
Nice to see someone else using ctrl-s! Never understood why people overwrite ctrl-a, which is home/BOL in the terminal (via readline)
Hey dude! Great video! Can you tell what’s is the your terminal config? Your terminal look awesome!
Moustache, Tmux, HHKB… what's not to love?
My three favorite things
What is hhkb
@@ThsHuntHappy Hacking Keyboard
@@ThsHunt The keyboard. It's iconic.
just what I needed after becoming an nvimmer thanks to you
You are posting so many good videos at the moment but what I really want to know is where you got that hoodie! haha!
edit: idk if i missed it, but i misunderstood and thought this changed the terminal too. took me a minute to realize i gotta setup that with catpuccin too for the background color etc. BUT now i got tokyonight on everything. so happy ILY
OMG IT WAS A PLUGIN AND THEME. tried askin some other linux/nvim streamers how they made it look like this with the tabs and everything so fancy. i thought it was IW3 or something. nope. da real hero of kvatch, typecraft.
This is really cool! Do zellij next!
Love it ❤
This is great, thanks! Do you know maybe how to enable clipboard sharing between different windows?
Here's my use case:
- I run vim in tmux window-0
- run tests in tmux window-1
test fails and I want to copy the filename from window-1 and paste it into vim running in window-0.
Appreciate it!
ps.: you can also use "setw -g mode-keys vi" to enable vim motions inside tmux
Awesome video! Thank you, nerd!
At 1:12, is that some sort of insider joke or a vampire glyph that just appears on the neck for a while?
waiting for next
Good work ... Keep going 💪
Can't stop, won't stop. ✊
try tick as a single key prefix ...its sooo much better to not press 2 key combo as a prefix, then when you want to press tick, you press it twice. That is very very very small price (even if you code typescript)
On my Linux system I have to use Shift + r to get config to reload, am assuming I need nerd fonts for statusbar... Great video and have subscribed ;-)
Awesome to follow along with! One issue if someone could give me a hand - when I try to setup config 3 of the prebuilt catppuccin tmux setups, when I add it and source the file, the changes don't take effect? Thanks as always for the awesome content Chris! Can't wait for part 3!!
Try to make sure they’re added right below the catpuccin tpm line
@@typecraft_dev Thanks man! I got it working this morning by removing the plugin from the folder in .tmux and then reinstalling it and starting a new session and it worked!
Thumbnail game is getting better by the video
Hi there! You mentioned that you set CTRL to CAPSLOCK, and I suppose you use the original ESC to exit insert mode or decline vim commands or no? Because I’ve rebind capslock to ESC and use the original CTRL btn, so just interested in your experience.
Thanks in advance for the feedback 🙏
Yup I bind caps to ctrl and I use esc to exit insert mode
A lot of people bind repeated presses of jk to go back to normal mode.
ctrl-c works in place of esc in terminal vim 90% of the time, I personally find this easy enough w capslock-control since I'm used to ctrl-c/ctrl-d on the terminal
@@NathanTenney I've been using JK for many years, but finally I've decided to change that, JK is a bit flaky for me and after moving to CapsLock I feel much better when typing and switching between modes. But It's just a personal preference
What terminal are you using?
Your keyboard sound very good is that a custom keyboard?
Nope it’s a happy hacking keyboard
the tmux neck tattoo killed me xD
Hello,
I was using Dracula theme in tmux and when I switched my config as suggested in this video I could not get the changes to show up. I made sure to comment out or delete all Dracula lines but still no.
In the plugins directory Dracula also had a tmux/ folder, once looking in side I could see that was Dracula theme not catppuccin. Delete that folder and reinstall plugins, and now it looks like what you see in the video.
One more reason to have unique names for the themes and not tmux.
Thanks,
Joe
Before I tried to make it pretty, now I try to keep it simple and useful
No reason it can't be both. I spend all day, every day in the terminal. Might as well make it pleasant.
@@NathanTenney sometimes you keep it simple and minimmalist so it can easily moved and deployed
I try to make it nice without adding dependencies.
what font are you using on your terminal?
your terminal prompt is dope!! how do i get that on my terminal??
Starship!
you're mapping caps lock to work as control, well, what about escape? I'm just curious!
Esc is in the normal spot for me
great video, but when I open nvim in tmux my color scheme changes, any ideas as to how to change it to the default.
damn that "LDUR" stuck on my head lol
I am not sure what it is and why tmux requires me to do this, but for me (I am also on mac and iterm2), i need to set 'set -s escape-time 0'. For some reason, without this i have noticeable delay when pressing esc to come back to normal mode while using tmux.
I've never had an issue with C-b since I use my right hand to press the b key. Oh and setting caps lock to Ctrl is the best decision I've ever made :)
Honestly can’t remember the last time I needed to use capslock, I made the switch and have never looked back
I've set mine to esc. Yes, I'm one of those oddities that still uses esc to go back to normal mode in vim/nvim
@@NathanTenney Nothing wrong with that, I just like having Ctrl so I can quickly do Ctrl l, u, a, and y in the terminal among other frequent shortcuts.
anybody else get the feeling of seeing magnum explain his retro 80s terminal settings - with that keyboard but better resolution? the sudden low key hype around tmux and vim… i call it “new wave programming” (tm).
Something I like to do is to unbind % and use | instead and unbind " and use - instead. Feels way more natural
Found you on twitter, most of (edit: what I read on) twitter is garbage, but your channel is actually fucking awesome. So yay, go me!
Go you!!! Thanks!
@typecraft Why dont you post a link to a github repo with the code or at least a gist?
I’ll get something together and let you know!
the next level DX
Thanks nerd! 🥰
How do I add some padding or space below the status line ?
I want to know as well :x
2:32 That's why you'd bind the enter key to right-control 😎 Then you'd just hold enter with you right hand and tap the B with your left hand 👉🅱️
Tmux tattoo 😂 nice one.
😁
Thanks! Adding theme for my tmux config. Thats for sure :) Also I’m using temperature gauge in the top right corner, helps to switch attention without leaving the terminal. And I’ve refused to use GitHub desktop today, cuz I have lazygit. What a nerd I am, after your videos! 😅
Thanks Nerd
@tyecraft I see what you did there with tmux icon on your neck lol
😂
What is terminal emulator u use
iterm2 .... for now ...
Pls, clipboard how. T__T I hate having to use
leader+[
leader+]
And what's copied with that doesn't get copied to the system clipboard
ldurrrrrrrrrr!
What is your prompt with the poo icon ?
Ok I found it starship prompt
"Just like VIM - super easy!"
couldn't agree more - but man, that must hurt some people :D
Haha I didn’t realize I said it like that
Le Durrr
Lol
Does tmux work in windows? Who knows? I'm talking without wsl2
Hi, nerds. If you will want to install beautiful cappuccin theme and you have tmux version 3.0 - you will have error 1. What you need to do: is update your tmux version on 3.2. It can be done from apt-manager for example or you can build it by hands.
Tried to use this on Putty, and it just doesn't look right. Am I doing something wrong?
when i load tmux its distorts my cutpuccin theme
you change the key binding from Ctrl+B to Ctrl+S because your unique way to use keyboard. You can just apply that to everyone else because it annoying after all.
You are a father figure.
By the way, I think you forgot to tell us to run the source-file order through prefix + b + : because if we don't do it manually we never get to the conf file in the first place, so the r bind is not usable.
Is this really Iterm2 never seen it look so good haha
Haha yup!
That keyboard gave me a jumpscare
I just sent the caps lock the hyper key
thanks nerd!
Amma make make my Tmux nice for my remote server!
man i wish i didnt have to use tmux on so many remote machines so i can use a custom config
Have you looked into warp terminal for macOS or Linux. It provides Tmux like capabilities out of the box
Yup! It’s great too
topre squad where u at
Yoooo
1:12 what happened to your neck? :D
CAPS to ESC for VI.
never tried that. I use a happy hacking keyboard and the ESC key is on the same line as the numbers. so its pretty ergonomic as it is
@@typecraft_dev which means you lose tilda and tick. I couldn't use your keyboard because of that and no arrows, which I constantly use in terminal.
tilda and tick are on the other side of the num row and arrows are accessible. Its all personal preference, really but I'm used to it and love it!@@erichlf
@@typecraft_dev I am rewatching this and I gotta say CTRL+B is find since that uses two hands. But everyone types differently.
And the best part is I said this and then did CTRL+B with my left hand.
Typecraft?
but u cannot use this in warp. Sad
hello nerds """
Me: Looks at current tmux config now
Thanks it now looks ugly by comparison. TPM here I come
ldur
✨LDUR✨
rebinding controls will fuck you up in new/remote environment. Better to learn defaults.
I mean, even installing plugins will have the same effect, but that's no reason to not customize your setup. Just copy paste or SFTP put your tmux.conf/bindings in the remote machine and you're done
@@lukeemhighat work, I had a bash alias that copied some configs using scp: ssh config, tmux config, vim config, etc
Having the host in status is very useful when you have ssh sessions to many servers.
> how to make tmux better
uninstall tmux
cargo install zellij
after installing this my escape key started behaving weirdly inside nvim. pressing it wouldn't escape immediately instead it would allow me to move the line or type things.
the fix is just to include this line in the conf
set -s escape-time 0
or use the sensible plugin
great video btw, it gave me the courage i needed to start using tmux.
highly sexual only thing missing is a link to your config file.
I know beauty is subjective but that's how I imagine a 15yo girl's terminal would look like. Way too much color my dude!
Sorry such a noob but can anyone help. In my .tmux.conf file anytime i type out -g for global the text is red and everytime I try to set a new keybind it does not work also in the part where it says bind r source-file ~/.tmux.conf is also red so i think it has something to do with that
look babe! another banger from nerd!
I'll give you an agenda for the next video, if it makes sense of course:
Save and retrieve sessions in tmux
For example, I use
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
I’ll be talking about it!
I've added commands in my zsh config to launch named tmux sessions for each of my projects. This sets up the base directory for my tmux sessions and allows me to bounce between projects and keep a semi-consistent set of windows and panes per project. The commands also detect if the named session is still active, so repeating the command attaches to the existing session. Once in tmux, I can switch projects by either detaching and then reattaching to the correct project, or switching tmux sessions with w.
Have you ever tried zellij instead of tmux?
I thought that this is what the cool kids use these days.
I’ll have to look into that