Created
March 29, 2017 17:32
-
-
Save Kanaderu/19010cd1c04ba5c200cfc66f393b78d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
im assuming that the tmux prefix is Control+b and that you have emacs style key bindings on | |
1) enter copy mode using Control+b [ | |
2) navigate to beginning of text, you want to select and hit Control+Space | |
3) move around using arrow keys to select region | |
4) when you reach end of region simply hit Alt+w to copy the region | |
5) now Control+b ] will paste the selection | |
you can navigate the text using the emacs style navigation key | |
Control+p, Control+n, Control+f, Control+b etc. | |
Dan in the comments informs me that if you have vi style key bindings on then the following applies: | |
1) enter copy mode using Control+b [ | |
2) navigate to beginning of text, you want to select and hit Space | |
3) move around using arrow keys to select region | |
4) when you reach end of region simply hit Enter to copy the region | |
5) now Control+b ] will paste the selection | |
To enable vi like cursor movement in copy mode put the following in your ~/.tmux.conf: | |
set-window-option -g mode-keys vi | |
more over what ever you copy, you may dump that out in your terminal using | |
tmux show-buffer | |
and even save to a file(say, foo.txt) using | |
tmux save-buffer foo.txt | |
To see all the paste buffers try Control + b #. To dump out the varios buffers on to the terminal or file you may use | |
tmux list-buffers | |
tmux show-buffer -b n | |
tmux save-buffer -b n foo.txt | |
where n is the index of the paste buffer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment