Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想发送一个可视块作为命令的替代,例如
:!echo < something from the visual block
我怎么能在 vim 中做到这一点?
最简单的方法是y将视觉选择(在视觉模式下)连接到寄存器中,然后启动命令 ( :!echo ...) 并通过 将寄存器的内容插入命令行<C-R>"。
y
:!echo ...
<C-R>"
一种方法是通过 使用命令行窗口q:,如此屏幕截图所示:
q: