-
tmux targeted session
https://youtu.be/5KE7Il7SOEk {.youtube-embed} This is something that I made up but use every single day, this is what keeps much of what is on my blog or my teams private work wiki going. I have a few very important directories that I have assigned directly to a hotkey for fast session switching. [[ tmux-new-session ]] This one is building off of yeserday's new-session post, make sure you check that one out as well. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this
-
tmux detach
https://youtu.be/A1qx3tNKDdA {.youtube-embed} tmux detach is a handy tmux command that will quit your current session while keeping it running. The full name of the comamnd is , is a shorthand. default keybinding I have mine bound to where mod is alt. https://waylonwalker.com/tmux-nav-2021/ {.hoverlink} for more information on how I navigate tmux, check out this full post Also check out the full YouTube tmux-playlist to see all of the videos in this series.
-
tmux attach
https://youtu.be/JQ0yDCVu44E attach is one of the most useful features of tmux. If you have no interest in tmux for pane and window management, you should use tmux for this. It can be a life saver if you ever get disconnected from the host machine or accidently close your terminal you can connect right back into the session you were just in using attach. attach this command will simply attach back to tmux if you are ever disconnected If you ever run long running tasks on a remote machine by ss
-
tmux ls
https://youtu.be/LY41GLn_DGg {.youtube-embed} tmux ls will list the sessions that you have running within the tmux server if tmux is currently running. This is handy to combine with commands such as . [[ tmux-attach ]] [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post Also check out the full YouTube tmux-playlist to see all of the videos in this series.
-
tmux command line
https://youtu.be/SNu-4IrkjAs {.youtube-embed} So far we have covered a lot of tmux commands and how they map to keybindings but these same commands can be executed at the command line. From the command line Let's make a popup that displays our git status for 5s or until we close it manually. We can run the following command at the command line, in a split. From the tmux command line Or we can open the tmux command line and run it from tmux's built in command line, which is very similar to bim E
-
tmux copy-mode
https://youtu.be/-ypY_-VmBKk {.youtube-embed} tmux copy-mode is a tmux mode that lets you scroll, search, copy, and jump your way through a pane. There are a ton of keybindings for copy-mode, the main ones you will need to know are for searching down for searching up, for next item, for starting a selection, and enter to copy the selection. Arrow keys will be used for navigation unless you have specified vi mode, then it will be . Default keybinding to get into copy mode is . If you a
-
tmux join-pane
https://youtu.be/Vm5rRtcVXLw {.youtube-embed} Join-pane allows you to join panes that you have broken away from your window, or created in a different window to the window you want it in. As far as I know there is not a default keybinding for it. Before you can join a pane you must first have a pane marked to join. Once you mark a pane, go back to the window you want to join it to and join-pane. My keybindings, you must add this to your file to use them. [[ tmux-nav-2021 ]] for more informat
-
tmux break-pane
https://youtu.be/ICL609F2xnc {.youtube-embed} Break-pane is a handy tmux command when your layout gets too cramped and you want to just move a split into its own window. Calling does exactly that, it creates a for you and moves your currently selected split into that window Default key binding for [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux zoom
https://youtu.be/Rn6mOarCQ-Y {.youtube-embed} Zooming into the current split in tmux is a valuable tool to give yourself some screen real estate. These days I am almost always presenting, streaming, or pairing up with a co-worker over a video call. Since I am always sharing my screen I am generally zoomed in to a level that is just a bit uncomfortable, so anytime I make a split it is really uncomfortable, being able to zoom into the split I am focused on is a big help, and also help anyone wat
-
tmux new-window
https://youtu.be/YRPZBv-iYyE {.youtube-embed} New window as it sounds makes new windows in tmux. Windows are kind of like tabs. They are another screen within your sessions that you can name and make new panes in. Default key bindings for creating and navigating windows in tmux. As always I have rebound these keys because I generally prefer a single keystroke over the prefix plus keybinding approach that tmux gives by default. When I started using tmux I did almost everything in one giant sess
-
tmux slect-pane
https://youtu.be/CPZJZjN9YTY {.youtube-embed} These are my MOST often used keybindings that I use in tmux. They allow me to jump between splits with ease with a vim style layout. I can hold mod and jump between panes with a familiar arrow key. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux rotate-window
https://youtu.be/06z5qf81ofo {.youtube-embed} Rotate window is the main way that I navigated tmux before I learned . It allows you to change your focused pane, or rotate the position of the panes easily. Default keybindings My keybindings look just a bit different than the default ones, I do not like needing to hit prefix for every command, especially for repeated commands. I set a similar keybinding to the default one that uses mod instead of prefix. [[ tmux-nav-2021 ]] for more information o
-
tmux select-layout
https://youtu.be/F0mHnwTrNNc {.youtube-embed} When you get many splits going in tmux sometimes its time for a new layout. There are four layout strategies that I use, main-vertical, main-horizontal, even-vertical, even-horizontal. Almost always I am useing the main ones with mod plus a or mod plus shift a keybindings. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux resize-panes
https://youtu.be/hpFYE2LU7xc {.youtube-embed} Resizing panes in tmux can be quite difficult in default tmux, I use a set of keybingings to help resize panes in the rare occasions that I do need just a bit more space. I set the keybinding to the same as my split navigation bindings but shifted. They are very vim like (h,j,k,l). Most often when I need to resize panes I just grab the edge of the pane with my mouse. Yes the mouse, its not that often that I actually need to change the size of a pan
-
tmux choose-tree
https://youtu.be/79Y-kqAiMpw {.youtube-embed} Choose tree is a powerful tmux utility that provides a graphical interface to preview all sessions, windows, and panes, move between them kill them, move them and much more. The default keybinding my preferred keybinding to open sessions and windows collapsed and Zoomed in. From the man page. https://waylonwalker.com/tmux-nav-2021/ {.hoverlink} for more information on how I navigate tmux, check out this full post
-
tmux prefix
https://youtu.be/BMkpbfhbkKM {.youtube-embed} The prefix key is an essential part of tmux, by default all of tmux's key-bindings sit behind a prefix. This prefix is very similar to vim's leader key. It is common for folks to change the default (control b) to or if they are a vim user something to match their vim leader key. A few of the essential default key-bindings. A more complete list of key-bindings can be found in this gist https://gist.github.com/mzmonsour/8791835 . [[ tmux-nav-2021
-
tmux splitting panes
https://youtu.be/kzgyiHap1nQ {.youtube-embed} splitting panes is a core feature of tmux. It allows us to split the terminal vertically or horizontally into new panes. 🗒️ note that '#{pane_current_path}'will keep the split in the same directory as it's parent, without this it will default to your home directory. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux last session
https://youtu.be/RB87EEnnMnU {.youtube-embed} An ultimate productivity key-binding in tmux is one to switch to the last session. I use this to quickly get between sessions really quick. Often I am working and need to lookup a quick note, or copy something into my notes, then get back to where I was quickly. I think of this hub and spoke model, and use to quickly drive it. hub and spoke [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux floating popups
https://youtu.be/2ZqFDsJywt8 {.youtube-embed} Tmux popups are actually floating windows that you can drag around the screen. They always open in the middle (by default) when you open them, no matter where you leave them. Here are a couple of keybindings I use to open up popup windows. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post
-
tmux popups
https://youtu.be/2I8fB28zfB4 {.youtube-embed} Tmux-popups are a great feature that is relatively new to tmux, many repos such as the standard ubuntu repos do not have it. Popups came in 3.2a, if your package manager does not have it, you can follow the tmux's install instructions to build from source. [[ tmux-nav-2021 ]] for more information on how I navigate tmux, check out this full post I use popups quite a bit in my workflow to ssh into another machine for a short period, or make a new p
-
How I navigate tmux in 2021
In 2021 I changed the way I navigate between tmux sessions big time. Now I can create, kill, switch with ease, and generally keep work separated into logical groups. Update Since making this post, I have made ~20 other posts in short form that all have a YouTube video to go along with them you can find them all on my tmux-playlist . Chris Toomey's Tmux Course I took Chris's tmux course in December 2020 and it was fantastic. Even as a seasoned tmux user, I learned quite a bit. Before the cou
-
If Tmux
I do much of my work from tmux, I love it so much that I want to setup some functionality that puts me in tmux even if I didn't ask for it. Bash Function Bash function to check if the shell is in a tmux session. Using the bash function I often open up vim to do some quite edits, but before I know it I have several splits open and I need access to another shell utility, but I forgot to start in tmux. This function makes sure tht I start in tmux everytime. Using to ensure vim is opened in tmux.
-
Keyboard Driven VSCode
Throw that mouse Away its time to setup some keyboard shortcuts. These sortcuts were the baseline for switching from tmux/vim to vscode. Most folks posts I was able to find gave great tips on replacing vim, but very few have focused on the hackability of tmux. tmux allows me to rapidly fire up a workspace, create new windows and splits. Then When I switch tasks I can leave that workspace open and and jump right back in later exactly where I left off. There is nothing quite like it. The shor