gVIM 不允许我输入某个字符
我是一个 VIM 新手。我的问题是,VIM 不允许我输入字符“á”,即使其他特定于 Magyar(匈牙利语)的字符(如“ő”和“í”)没有问题。我有 UTF-8 编码和 Dejavu Sans Mono 字体集,并且正在使用 Windows 7。我已经尝试执行 :unmap á
但它只导致“没有这样的映射”消息。感谢您的任何提示!
更新:执行 :set keymap=magyar_utf-8
没有任何作用。我在 $VIMRUNTIME/keymap
中有一个名为 magyar_utf-8.vim
的映射文件,我使用的版本是 7.3。 此外,“á”使光标在 INSERT 模式下跳转到行尾。大写“Á”按预期工作。
I'm a rookie VIM user. My problem is that VIM doesn't let me type the character "á" even though there's no problem with other characters specific to Magyar (Hungarian), like "ő" and "í". I have UTF-8 encoding and Dejavu Sans Mono font set and am using Windows 7. I already tried doing :unmap á
but it only resulted in a "No such mapping" message. Thanks for any tips!
Update: Executing :set keymap=magyar_utf-8
didn't make a difference. I have the mapping file named magyar_utf-8.vim
in $VIMRUNTIME/keymap
and the version I'm using is 7.3.
Furthermore "á" makes the cursor jump to the end of line in INSERT mode. Uppercase "Á" works as expected.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下操作:
如果键盘上有 /key/ 对应字符
á
,请在命令行中输入以下内容:以查看它被识别为什么。
或者,找到它的二合字母
可能,使用上面找到的关键代码,将其映射到使用二合字母(在我的系统上,二合字母是Ck'a)
为了完整性,特殊键盘布局一般由
keymap 设置,SO 有许多关于如何将它们与 dvorak 键盘等结合使用的帖子。
Try these things:
If there is a /key/ on your keyboard for the character
á
, type this on the command line:to see what it is recognized as.
Alternatively, find the digraph for it
Possibly, using the above found key code, map it to use the digraph (on my system the digraph is C-k'a)
For completeness, special keyboard layout in general are handled by
keymap
settings, SO has a number of posts on how to use them in combination with e.g. dvorak keyboards.最后我找到了解决方案。因此,对于每个在匈牙利系统上使用 gVIM 和 auto-pairs 插件的人来说,注释掉
auto-pairs.vim
中的第 196 行
,这样你就可以输入字母 < code>á 如您所料。我有自动配对插件版本 1.1.1,在我的文件中要更改的行如下:
execute 'inoremap; <沉默> <马>
Finally I've found the solution. So for everyone who happen to use gVIM on a Hungarian system with the auto-pairs plugin, comment out
line 196
inauto-pairs.vim
so you can type the letterá
as you would expect.I have auto-pairs plugin version 1.1.1 and in my file the line to be changed reads:
execute 'inoremap <buffer> <silent> <M-a> <END>