7

windows terminal 的 Ctrl+V 和 VIM 的块操作快捷键冲突

 2 years ago
source link: https://zhiqiang.org/it/windows-terminal-paste-conflict-with-vim-block-selection.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

windows terminal 的 Ctrl+V 和 VIM 的块操作快捷键冲突

作者: 张志强

, 2022-08-31

, 共 337 字 , 共阅读 21 次

在 VIM 里, Ctrl+V 用来标记一个矩形区域,可以同时操作多行文本,某些时候特别方便。但若用的 SSH 客户端是 windows terminal ,这个快捷键默认为粘贴文本,和 VIM 矩形区域标记的功能冲突(参考 issue: Ctrl+V (vertical selection in Vim) does not work)。

解决办法,打开 windows terminal 的配置文件,删除下面这行配置:

{ "command": "paste", "keys": "ctrl+v" },

删除之后,矩形区域标记功能恢复正常。粘贴功能可用快捷键 shift+insert。

Q. E. D.

avatar-0.jpg

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK