我经常想从:terminal
窗口到普通文本缓冲区。此刻我exit
shell 会话并从历史记录中复制。
一定有更好的方法。
Copy
To copy from a terminal window press CTRL-W N (This is a capital N)1 or CTRL-\ CTRL-N (this is not a capital N) to get into normal mode. From there you can use all usual vim commands to copy and paste stuff.
进入插入模式将使您返回 shell。
Paste
要将寄存器粘贴到终端窗口中,您必须处于终端作业(“插入”)模式。
Press CTRL-W " followed by the register.
:help Terminal-mode
告诉我们:
当作业运行时,终端的内容由
工作。这包括光标位置。键入的密钥将发送到作业。
终端内容可以随时更改。这称为终端作业
模式。
使用 CTRL-W N(或“termkey”N)切换到终端普通模式。现在
终端窗口的内容由 Vim 控制,作业输出为
暂停。 CTRL-\ CTRL-N 的作用相同。
[...]
在终端普通模式下,你可以使用通常的 Vim 移动光标
命令、可视化标记文本、拉取文本等。但您无法更改
缓冲区的内容。将启动插入模式的命令,例如
'i' 和 'a',返回终端作业模式。
See :h terminal-typing
在终端窗口中获取更多有用的命令。
1Unfortunately the vim help doesn't tell you that it is a capital N, I kept the original notation
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)