diff --git a/README.md b/README.md index d4c8669..691962c 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Squeeze Out The Extra Space](ruby/squeeze-out-the-extra-space.md) - [Summing Collections](ruby/summing-collections.md) +### tmux + +- [Organizing Windows](tmux/organizing-windows.md) + ### vim - [The Black Hole Register](vim/the-black-hole-register.md) diff --git a/tmux/organizing-windows.md b/tmux/organizing-windows.md new file mode 100644 index 0000000..4273369 --- /dev/null +++ b/tmux/organizing-windows.md @@ -0,0 +1,17 @@ +# Organizing Windows + +If you use a number of tmux windows as part of your daily workflow, you may find that they get to be a bit of a mess from time to time. There are gaps in the numbering and they aren't laid out in the order you'd prefer. The `movew` command makes it easy to rearrange these windows. + +If you have a window indexed at 2 and you want it to be the 4th window, then you can: + +``` +:movew -s 2 -t 4 +``` + +If you have a gap such that the 4th and 5th windows are numbered 4 and 7, then you can focus the 7 window and simply invoke: + +``` +:movew +``` + +And that window will be reinserted at the next available slot, in this case, window 5.