我一年前就发现了Vim,而且我对它越来越上瘾了。
我重新映射了我的法国德沃夏克风格的bépo布局的每个键,以坚持正常模式的qwerty布局,就像在这个页面上的“重构故事和触摸”中所描述的那样:https://bepo.fr/wiki/Vim,本质上是因为我从Vim Adventures游戏中学到了东西。
它工作得很好:
例如,yr重新映射为cl:该命令将字符向右剪切并进入插入模式。
但是,vim状态行在显示c:之前会显示y一秒钟:

我将我的映射从:
noremap y c
要这样做:
map <nowait> y c
没有成功。
有没有人知道是否可以立即显示一个重新映射的操作符挂起的键,即在我的例子中是"c“?
发布于 2019-10-17 18:37:02
这与vim-airline或任何其他插件无关。
由于showcmd标准选项,显示了待定运算符。除了完全禁用它(set noshowcmd),或者修补Vim的源代码之外,没有办法改变这一点。
发布于 2020-05-27 22:22:26
一种更简单的解决方案是使用langmap,而不是重新映射每个组合键。这提供了显示重新映射的命令键的额外好处。
来自:h langmap
This option allows switching your keyboard into a special language
mode. When you are typing text in Insert mode the characters are
inserted directly. When in Normal mode the 'langmap' option takes
care of translating these special characters to the original meaning
of the key. This means you don't have to change the keyboard mode to
be able to execute Normal mode commands.要对其进行测试:
在正常模式下,:set langmap=éw将é重新映射到w。
:set showcmd在状态行中显示w而不是é。
https://stackoverflow.com/questions/58430305
复制相似问题