To enable this copy mode, in you tmux config file, add:Įnter fullscreen mode Exit fullscreen mode The correct way to copy a text from tmux is to first switch to copy mode, then copy it, then paste it. If you try to copy a text from a tmux window with your mouse, you may have seen a warning saying that you can't simply copy the text. To navigate your terminal history and to copy text, you need to switch to tmux copy mode (technically it is vi-copy-mode, but to keep it simple, let's call it copy mode). If you need to insert texts, you need to switch to vim insert mode. Vim's normal mode is designed for moving (and to a certain extent, modifying) within your file. In Vim, we have a normal mode where you can move around with your keyboard. What that means is that to accomplish a specific task, you need to switch to a mode that's optimized for that task. One of them is that they are modal programs. In this article, I will show you how to utilize tmux copy mode to easily copy text. Copying with tmux is more like copying in Vim, where it's best done with a keyboard rather than a mouse. Having used text editing softwares like Microsoft Word / Google Docs and to some extent, Atom / VSCode / IntelliJ, it may feel natural to grab your mouse, highlight the body of texts, and press Ctrl + C. That's because it's now how tmux is designed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |