有没有办法改变 Windows 上 Vim 的键盘布局?
我正在处理几个文档,我必须在其中输入 [
]
{
等(使用美式键盘布局会更容易(我更习惯使用它))但我还必须输入变音符号,例如 ä、ö 和 ü。
通常,我会设置(我认为是标准的)Windows 快捷方式 Alt+Shift
在这些布局之间切换。
这是不切实际的,因为有时我不确定当我需要德语布局时我是否已经处于德语布局中(反之亦然)。
那么,有没有更好的方法来更改 Vim 中 *OS 级别的键盘布局”?
我想这可以通过更改 :map
和 :imap
来解决,但我除非真的被迫,否则宁愿不要将它们用于此类目的。
I am working on several documents where I have to type [
]
{
and the like (which is much easier with with an american keyboard layout (and to which I am used much more)) but where I also have to type Umlauts such as ä, ö and ü.
Usually, I go be setting up the (what I believe to be a standard) Windows Shortcut Alt+Shift
to switch between these layouts.
This is unpractical, because at times I am not sure if I am already in the german layout when I need the german layout (and vice versa).
So, is there a better way to change the keyboard layout in Vim on *OS-level"?
I guess it could be solved with changed :map
and :imap
but I'd rather not use these for such porposes unless really forced to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不认为有这样的选择 - 尽管 vim 甚至可以为你做煎饼!
任何程序都不太可能允许更改常规键的键盘布局,因为基本上任何操作系统都已经支持它。
I don't think there is such an option - even though vim can even make pancake for you!
It'd be highly unlikely for any program to allow changing the keyboard layout of regular keys since basically any OS already supports it.
您启用了语言栏吗?它应该有一个代表您当前设置的图标。
Microsoft 知识库文章:如何:在 Windows XP 中使用语言栏
Do you have the language bar enabled? It should have an icon that represents your current settings.
Microsoft Knowledgebase article: HOW TO: Use the Language Bar in Windows XP
如果您唯一需要的是轻松添加变音符号,Vim 内置支持添加这些字符:
方法 1。 在插入模式下输入:
CTRL-K a:
给予 ä.方法 2. 如果您使用
:set digraph
,您可以输入a:
得到相同的结果。这些方法适用于任何需要元音变音的字符,只需分别使用
CTRL+K o:
或CTRL+K u:
即可。来源: http://vim.wikia.com/wiki/Entering_special_characters
If the only thing that you need is to add umlauts easily, Vim has built-in support for adding these characters:
Method 1. In insert mode type:
CTRL-K a:
to give ä.Method 2. If you use
:set digraph
you can entera<BS>:
to give the same result.These methods will work with any character that needs umlauts, just use
CTRL+K o:
orCTRL+K u:
respectively.Source: http://vim.wikia.com/wiki/Entering_special_characters
也许您可能对一些德沃夏克布局感兴趣(我的是 bépo,也许它适合您?)
Maybe you could be interested in some Dvorak layouts (mine is bépo, maybe it could suit you?)