如何在 VIM 中映射 CAPS LOCK 键? [英] How to map CAPS LOCK key in VIM?

查看:45
本文介绍了如何在 VIM 中映射 CAPS LOCK 键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 下使用 GVIM.并想将 CAPSLOCK 映射到 Ctrl+^

I'm using GVIM under Windows. And want to map CAPSLOCK to Ctrl+^

有没有办法做到这一点?

Any way to do this?

顺便说一句,我在网上看到了大量如何使用注册表 hack 交换 CAPS 和 Esc 的示例,但它们都没有使用 VIM 映射命令,而是使用外部工具和注册表更改.

Btw, I see tons of samples over the web how to swap CAPS and Esc using registry hack, but none of them use VIM map command, instead external tools and registry changes.

推荐答案

Linux?对于 X,使用 xmodmap 更改键映射,例如

Linux? With X, use xmodmap to alter the key mapping, e.g.

xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'

将 Esc 映射到 CapsLock 键.Google 了解更多示例.

Will map Esc to the CapsLock key. Google for more examples.

这篇关于如何在 VIM 中映射 CAPS LOCK 键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆