首页 > 解决方案 > How to copy multiple pages from VI inside tmux session

问题描述

I am trying to copy a long text around 350 lines. But i can select only 15-20 lines that are currently visible in terminal and i cannot scroll down once i select copy mode inside tmux. here are the steps

  1. tmux attach
  2. ssh user@host
  3. vi filename.java
  4. Ctrl+b and [
  5. Ctrl+space and then up/down left right arrow to make selection. After that once i reach to end 1 cannot scroll further to select rest of the text.

标签: linuxvitmux

解决方案


Use cat command.

Example:

cat example.cfg

With the output of that command you can select with your mouse all the content you want instead of going every 30 lines to do it.

Then you can connect to your other server and just paste it into the new file.


推荐阅读