使Vim仅在插入模式下使用Dvorak键盘绑定? [英] Make Vim use Dvorak keybindings ONLY in insert mode?

查看:106
本文介绍了使Vim仅在插入模式下使用Dvorak键盘绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Vim中键入内容时,我想使用Dvorak布局.但是,我希望所有快捷方式都保持不变(就像键盘在命令模式下是Qwerty一样).我尝试使用此:

I would like to use the Dvorak layout when I am typing in Vim. However, I would like all of my shortcuts to stay the same (behave as if keyboard is Qwerty in command mode). I have tried using this:

set langmap=q',e.,rp,ty,yf,ug,ic,or,pl,[/,]=,aa,so,de,fu,gi,hd,jh,kt,ln,\\;s,'-,z\\;,xq,cj,vk,bx,nb,mm,.v,/z,-[,=],Q\\",W<,E>,RP,TY,YF,UG,IC,OR,PL,{?,}+,AA,SO,DE,FU,GI,HD,JH,KT,LN,:S,"_,Z:,XQ,CJ,VK,BX,NB,MM,<W,>V,?Z      

在插入模式下将我的qwerty键映射到dvorak,但是我发现它干扰了我的某些快捷方式.我想做到这一点,同时将键盘映射到操作系统其余部分(Windows 7)上的qwerty.如何使用Vim做到这一点? langmap实际做什么? (查找文档时遇到麻烦)

to map my qwerty keys to dvorak while in insert mode, but I found that it interfered with some of my shortcuts. I would like to do this while keeping my keyboard mapped to qwerty on the rest of my OS (Windows 7). How can I achieve this with Vim? What does langmap actually do? (had trouble finding documentation)

如果键盘在搜索模式下处于dvorak状态,那将是很好的选择,但这更多的是额外的好处.

It would be nice if the keyboard was dvorak in search mode, but that's more of an added bonus.

推荐答案

我想在将键盘映射到qwerty的同时执行此操作 我操作系统的其余部分(Windows 7)

I would like to do this while keeping my keyboard mapped to qwerty on the rest of my OS (Windows 7)

–因此只需使用:set keymap=dvorak(在vim73/keymap/的Ubuntu的默认Vim配置中可以找到dvorak.vim,它在Windows上也必须可用).它的作用与您描述的一样:Dvorak方法用于插入模式和搜索模式.

– so just use :set keymap=dvorak (dvorak.vim may be found in default Vim configuration on Ubuntu in vim73/keymap/, it must be available on Windows too). It does what you describe: Dvorak method is used in insert mode and search mode.

这篇关于使Vim仅在插入模式下使用Dvorak键盘绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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