热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

带有Emacs或VIM的Colemak键盘。-ColemakkeyboardswithEmacsorVIM

IvebeencrossingthingsoutonmyTODOlist.IverecentlypickedupColemak.NextIwantedtolea

I've been crossing things out on my TODO list. I've recently picked up Colemak. Next I wanted to learn Vim or Emacs. I was leaning towards Vim, however one of its benefits are sticking to the home row. With Colemak, the home row has been changed. I realize that I could remap the keys, but assigning the functionality to different letters is not extremely appealing to me (if there is any relation between letters and their function. I know movement is not correlated but I'm not sure on all the rest.)

我在待办事项清单上划掉了一些东西。我最近买了Colemak。接下来我想学习Vim或Emacs。我倾向于Vim,然而它的一个好处是坚持住了本垒。有了Colemak,家庭争吵就改变了。我意识到我可以重新映射键,但是将功能分配给不同的字母对我来说并不是特别有吸引力(如果字母和它们的函数之间有任何关系的话)。我知道运动是不相关的,但我不确定其他的。

I don't want to start an argumentative post about text editors, but rather receive comments from Colemak (or Dvorak) users about alternative keymappings and these two editors.

我不想开始一篇关于文本编辑器的议论文,而是收到来自Colemak(或Dvorak)用户的评论,关于可选的keymapping和这两个编辑器。

Thanks

谢谢

8 个解决方案

#1


7  

Glad to see another Colemak user :)

很高兴看到另一位Colemak用户:)

For Emacs there really isn't a need to remap, since the initial "shortcuts" aren't designed to be close to each other. If anything, you're gonna be more comfortable using Emacs on Colemak than on Qwerty (at least I was).

对于Emacs来说,确实不需要重新映射,因为最初的“快捷方式”并不是设计成彼此接近的。如果有的话,你会比Qwerty(至少我是)更舒服地在Colemak上使用Emacs。

In Vim it's a lot trickier since hjkl will be completely messed-up. Then again, I've always felt that hlkl was broken and should have instead been jkj; or ijkl, so a remap is probably a good thing. Here's a broader discussion about Colemak+Vim on the Colemak forum: http://forum.colemak.com/viewtopic.php?id=50

在Vim中,由于hjkl会完全被破坏,所以要复杂得多。再一次,我总是觉得hlkl已经坏了,应该是jkj;或者ijkl,所以重新映射可能是件好事。下面是Colemak+Vim论坛上更广泛的讨论:http://forum.colemak.com/viewtopic.php?id=50

#2


12  

I'm using a similar set up to Graham (up, down, left, right, is hkjl (Qwerty hnyu)) but instead of using noremap, remap using langmap in my .vimrc:

我使用了一个类似于Graham的设置(向上,向下,左,右,是hkjl (Qwerty hnyu)),但是不是使用noremap,而是在我的。vimrc中使用langmap:

set langmap=hk,jh,kj

This has the added advantage of changing other commands that use these movement keys (e.g. g, z and C-w) without having to redefine all these commands manually, i.e. C-wh moves up a window, C-wk moves down a window, etc.

这就增加了使用这些移动键(例如g、z和C-w)的其他命令的优势,而不必手动重新定义所有这些命令,例如C-wh移动到窗口,C-wk移动到窗口,等等。

#3


10  

I have recently switched to Colemak and I also use Vim as my main editor.

我最近切换到Colemak,我也使用Vim作为我的主要编辑器。

I can tell you that there is no need to remap the movement keys - or any other Vim keys for that matter. Your brain will quickly learn the new positions of the movement keys. For the mnemonic keys there is definitely no need to remap - you want to keep the mnemonic meanings behind the keys.

我可以告诉您,没有必要重新映射移动键——或者任何其他的Vim键。你的大脑很快就会知道运动键的新位置。对于助记键,绝对不需要重新映射——您希望保持键背后的助记符含义。

If you remap the Vim movement keys you will be in the unfortunate position of not being able to operate a vanilla Vim with any real efficiency - for example if you need to SSH to a server. I argue that for most people that will be much more common than having to use someone's computer that does not have Colemak.

如果重新映射Vim移动键,您将处于无法以任何实际效率运行普通Vim的不幸境地——例如,如果需要SSH到服务器。我认为,对大多数人来说,这比使用没有Colemak的电脑要普遍得多。

As well, there are Vim plugins you may get one day that will clash with your remappings, or you will read a Vim tip one day about a feature which you can't now use because you have remapped things.

同样,你可能有一天会得到与重塑相冲突的Vim插件,或者有一天你会读到Vim提示,关于一个你现在不能使用的特性,因为你已经重新映射了东西。

It will be a real pain for you, so I wouldn't bother with any remappings.

这对你来说是很痛苦的,所以我不需要任何装饰。

#4


6  

This in your .vimrc will change the cursor movement for Colemak without affecting other vim mappings, because it only affects the h/j/k letters.

在.vimrc中,这将在不影响其他vim映射的情况下更改Colemak的光标移动,因为它只影响h/j/k字母。

  • up = h (labelled as "h" on the keyboard)
  • up = h(键盘上标为“h”)
  • down = k (labelled as "n" on the keyboard)
  • down = k(键盘上标为“n”)
  • left = j (labelled as "y" on the keyboard)
  • 左= j(键盘上标为“y”)
  • right = l (labelled as "u" on the keyboard)
  • 右= l(键盘上标为u)

Here is the mapping:

这是映射:

noremap h k
noremap j h
noremap k j

#5


4  

I've run with Dvorak for a number of years now (probably ~4). I have also used vim for all of the standard reasons you have to use vim like things (less, config edits that have their own editors (visudo, etc.), etc.). Emacs was actually the first Unix program that I learned (I'm a native to the Apple world) and I currently picked it back up after being castigated by Yegge's ramblings about how ridiculously awesome it is.

我和德沃夏克一起跑步已经很多年了(可能是4年)。我还使用了vim,原因是您必须使用vim之类的东西(更少的配置编辑具有自己的编辑器(visudo等))。Emacs实际上是我学到的第一个Unix程序(我是苹果世界的原生用户),我在受到Yegge喋喋不休地说它是多么的棒之后,现在又重新拾起了它。

From a strictly keyboard layout stance, I would say that Emacs is probably the winner here because no remapping is required. Other than swapping the Caps-Lock key for a Control key (which should really be done period, the Caps-Lock key is like every keyboard's high-school hickey), I would say that every keybinding is more comfortable to use with Dvorak than with Qwerty. I especially find the constantly used C-x and M-x bindings to be very comfortable to type.

从严格的键盘布局角度来看,我认为Emacs可能是这里的赢家,因为不需要进行重新映射。除了将Caps-Lock键替换为一个控制键(应该在一段时间内完成,Caps-Lock键就像每个键盘的高中hickey)之外,我要说的是,与Dvorak一起使用每个键绑定要比与Qwerty一起使用更舒服。我特别发现经常使用的C-x和M-x绑定非常适合输入。

However, vim is really no big deal. 'j' and 'k' are still right next to each other. 'h' and 'l' are at least conveniently on one hand and are on and above the home row. Other than that, it's simply about remapping the keys in your mind for doing things in the editor that you want to hae happen. I personally don't see any reason to remap anything, and I'm high risk for RSI (hence the switch to Dvorak). For keyboard centric apps like vim and emacs, the fact that I can use them comfortably unaltered should be fairly impressive. :)

然而,vim真的没什么大不了的。'j'和'k'仍然紧挨着。“h”和“l”至少在一方面是方便的,并且在本垒之上。除此之外,它只是在您的脑海中重新映射您想要在编辑器中执行的操作的键。我个人认为没有任何理由重新映射任何内容,而且RSI的风险很高(因此我转到Dvorak)。对于以键盘为中心的应用程序,如vim和emacs,我可以很舒适地使用它们而不做任何改动,这应该是相当令人印象深刻的。:)

Good luck!

好运!

#6


3  

I'm using Ryan Heise's solution for Vim:

我用的是Ryan Heise的解决方案:

I came up with the "NEST" navigation bindings which preserve the physical location of the up/down navigation keys (left/right are different but still on the home row):

我想到了“NEST”导航绑定,它保留了上下导航键的物理位置(左/右不同,但仍然在主行):

N = down E = up S = left T = right

N = E = S =左T =右。

The commands for setting this up are on my Colemak page at the bottom:

设置这个的命令在我的Colemak页面的底部:

http://www.ryanheise.com/colemak/

http://www.ryanheise.com/colemak/

Mostly, these bindings allow you to use a regular vim cheat sheet to learn the commands, except for navigation of course.

通常,这些绑定允许您使用常规的vim备忘单来学习命令,当然导航除外。

Of the 4 keys assigned in N-E-S-T, the "N" ("n"ext search result) and "E" (move "e"nd of current word) were frequent but gobbled up. I remapped them back to their original QWERTY positions and so they are the only two commands that don't have their original logical names.

在N-E- s - t中分配的4个键中,“N”(“N”ext搜索结果)和“E”(当前单词的“E”nd”移动)是经常出现的,但都被吞掉了。我将它们重新映射到最初的QWERTY位置,因此它们是惟一两个没有原始逻辑名称的命令。

Taken from https://forum.colemak.com/topic/50-colemak-vim/p2/#p2514

从https://forum.colemak.com/topic/50-colemak-vim/p2/ p2514

#7


2  

I'm a vim+qwerty user (I've tried learning dvorak, but it turns out typing speed is not my rate limiting factor and I don't have RSI issues). Only the hjkl cursor movement keys in vi(m) are position dependent, everything else is mnemonic. I see on the Colemak layout, that h/l are vaguely left/right, but j/k are down/up. Nevertheless, I doubt that would be a significant stumbling block. You could either use the arrow keys instead, or continue to use hjkl and deal with the funny positions.

我是一个vim+qwerty用户(我试过学习dvorak,但结果是打字速度不是我的速率限制因素,我没有RSI问题)。只有vi(m)中的hjkl光标移动键与位置有关,其他的都是助记符。我在Colemak布局中看到,h/l是模糊的左/右,但j/k是向下/向上的。然而,我怀疑这将是一个重大的绊脚石。您可以使用箭头键代替,或者继续使用hjkl并处理有趣的位置。

I wouldn't be inclined to try to remap the vim functions depending on the keyboard layout. That seems like too much potential confusion for me.

我不会尝试根据键盘布局重新映射vim函数。这对我来说似乎太容易混淆了。

#8


1  

Here is a previous post that should help you some. There is some discussion on there, some users don't remap. Some do.

这里有一篇文章可以帮助你。这里有一些讨论,有些用户不重新映射。有些人确实是这样做的。

I am going to remap over the weekend actually. I have for the past year used the default mappings, with Dvorak.

我打算在周末重新绘制地图。在过去的一年中,我使用了默认映射Dvorak。


推荐阅读
author-avatar
mobiledu2502920327
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有