

Usually these are the UI-related commands. Some configs won't take place even after you reload the config file. So each time you make changes to the config file, save the tmux config and run Prefix + r. It's a great way to bind a single key with multiple commands. The semi-colon ( ) lets you to sequentially combine multiple tmux commands. Config file source ( source-file ~/.nf).The bind command (short for bind-key) binds the letter r to perform the following (note, this actually binds Prefix + r, not just the letter r by itself) If you're a tinkerer, a shortcut to quickly source your config file can be useful. Tmux will re-execute all the codes inside the ~/.nf file. To reload tmux, run tmux source-file ~/.nf from the terminal or run source-file ~/.nf from tmux's command-line mode. When you edit your tmux config file, you will need to reload it for the change to take place. For example, if you need to run display "hello" and you currently have Vim open, instead of exiting Vim then typing tmux display "hello", with the command-line mode, you can just press Prefix + : and type display-message "hello" - without exiting Vim! One advantage of the command-line mode is that you can run any tmux command while having another program running. If you look at the status bar (bottom of the screen), you'll see the "Hello my tmux friends" text. Type this from the terminal inside a tmux session:Įnter fullscreen mode Exit fullscreen modeĪgain, with this approach you don't have to type tmux display anymore. For example, to display a message, you can use tmux's display-message command. Tmux has a set of commands that you can run from the terminal inside a tmux session. I hope that you will be able to start your tmux journey at a better place than I did: understanding what you put into your config file instead of copy-pasting anything that remotely look interesting without knowing what it really does. I also make sure that I understood the ones that I keep. Now that I'm older and wiser (am I? :D), I have deleted the configs that I don't need. When I started using tmux a few years ago, I copied + pasted much of my tmux config from random sites I found from the internet. I remember the times I was staring at a blank MS Word when having to write a report or a blank Strathmore Paper when having to draw a scene - it can be intimidating having to fill up your config file from a blank slate. The possibilities are endless.Įndless possibility is not always a good thing. So what can you put inside the tmux config file? Anything. It is a path to a file where you enter your own configurations so next time you launch tmux, it executes everything inside that config file. nf in the HOME path ~/.nf (technically tmux looks for /etc/nf first, then ~/.nf, but the former is best left untouched).Ī. When you start a tmux session, tmux looks for a file named. To do this, we need to configure the tmux config file. It would be nice to be able to change some of the default configs into something that are more intuitive to me, the user. There is nothing about " and % that are associable to horizontal / vertical splits. I also found commands like the split commands Prefix + " and Prefix + % are not intuitive. The letter b is positioned at a weird distance from the ctrl button.

For example, I never understood why tmux uses Ctrl + b as a prefix. When you start using tmux, you may think that some of tmux's keys are not intuitive or straight-up uncomfortable to reach. It is highly recommended that you either read my previous article or are already familiar with how tmux works. No, tmux can't do your chores or make your wildest dreams come true, but tmux probably can make your wildest terminal multiplexing dreams come true :D. Whenever you thinking "Can Tmux can do that?" when reading this article, the answer is, 90% of the time, "Yes, tmux can do that!". Here you will learn useful tmux shortcuts you might not even know exist.

My hope is that by exposing a list of my personal tmux configurations and my reasoning behind them, you will see a general pattern and understand it enough to make tmux your own. Here you'll learn some configurations that I use.
#Tmuxinator layout options how to
However, in that article, I didn't cover much how to customize tmux. In the previous article, you learned how to use tmux: what tmux is, how to manage multiple terminals, and how to use tmux's powerful features. This article is part 2 of my tmux series. Configuring Your Tmux to Be Even More Awesome
