![]() SessionsĪ Tmux session can contain multiple windows. The index number displays next to the name. To navigate through windows press Ctrl-b followed by the index number of the window you want to go. In order to create a new window you need to press “Ctrl-b c”. In this case, there are three windows: “server”, “editor” and “shell”): Here is an example of how Tmux displays (by default) the list of windows created. The list of existent windows in a Tmux session displays at the bottom of the screen. This is an efficient use of the available screen space. Tmux windows are useful since they allow users to allocate panes inside of them, to see more about each pane by going to the window that contains it. And another window called “shell”, which is a bash shell where I can run system commands. One pane for Vim and another for running the code tests. For instance, in my case I usually have one window called “server” for running the app’s server (where I can see the log), another window called “editor” (where I do the coding). Tmux windows allow you to arrange multiple panes inside windows depending on what you need. In Tmux, a window is a container for one or more panes. ![]() Navigating through Tmux panes is easy, just press the Tmux prefix and then any of the direction arrows depending on which pane you want to go. Also, if what you need is a horizontal division then press “Ctrl-b “”. Once you have launched a new Tmux session just press “Ctrl-b %” and a new vertical pane will appear. – Left side: Vim (at the top: a Ruby class file, at the bottom: a test file for the Ruby class).Ī vertical pane is easy to create. I could even have another console if I wanted to. I like the idea of dividing the screen vertically, so that on one side of the screen I have Vim and on the other side I have the output of my code. If you want to do the same follow the steps on the “ Pimp your Tmux bar” section of this post. This is because I modified the status bar. Quick note: the screenshot shown here may differ slightly from what you see by default when you install Tmux. This way, once you have added a new change to the ~/.nf file, just press ctrl-b R to reload your configuration without having to open a new Tmux session. Here is what you need to add in your ~/.nf file to change the prefix to Ctrl-a: Once the Ctrl key has been set to the caps-lock key, it gets a lot easier/quicker to call Ctrl-a instead of Ctrl-b, because the new prefix keys are very close to each other on the keyboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |