编程的理想键盘布局 [英] An Ideal Keyboard Layout for Programming

查看:243
本文介绍了编程的理想键盘布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常听到抱怨说,为了简洁起见,大量使用符号的编程语言很难键入,因为它们需要频繁使用Shift键,因此很难键入.一两年前,我本人对此感到厌倦,下载了Microsoft的键盘布局创建器,对我的布局进行了一些更改,并且一次也没有回头.速度差是惊人的.通过这些简单的更改,我就能以大约30%的速度键入C ++代码,这取决于它的毛发程度.最棒的是,我在普通运行文本中的打字速度没有受到影响.

I often hear complaints that programming languages that make heavy use of symbols for brevity, most notably C and C++ (I'm not going to touch APL), are difficult to type because they require frequent use of the shift key. A year or two ago, I got tired of it myself, downloaded Microsoft's Keyboard Layout Creator, made a few changes to my layout, and have not once looked back. The speed difference is astounding; with these few simple changes I am able to type C++ code around 30% faster, depending of course on how hairy it is; best of all, my typing speed in ordinary running text is not compromised.

我的问题是:存在哪些可供编程使用的备用键盘布局,这些布局已经越来越流行,其中任何一种仍在现代使用,您个人是否使用任何更改的布局,以及如何进一步优化我的布局?

My questions are these: what alternate keyboard layouts have existed for programming, which have gained popularity, are any of them still in modern use, do you personally use any altered layout, and how can my layout be further optimised?

我对标准QWERTY布局进行了以下更改. (我不使用 Dvorak ,但是有一个

I made the following changes to a standard QWERTY layout. (I don't use Dvorak, but there is a programmer Dvorak layout worth mentioning.)

  • 在第一行中用符号交换数字,因为通常将长的或重复的文字数字替换为命名常量;
  • 用波浪号替换反引号,因为反引号在许多语言中很少见,但析构函数在C ++中很常见;
  • 用下划线代替负号,因为下划线在标识符中很常见;
  • 将花括号换成方括号,因为块比下标更常见;和
  • 用双引号替换双引号,因为字符串比字符文字更常见.
  • Swap numbers with symbols in the top row, because long or repeated literal numbers are typically replaced with named constants;
  • Swap backquote with tilde, because backquotes are rare in many languages but destructors are common in C++;
  • Swap minus with underscore, because underscores are common in identifiers;
  • Swap curly braces with square brackets, because blocks are more common than subscripts; and
  • Swap double quote with single quote, because strings are more common than character literals.

我怀疑这最后一个可能是最具争议的,因为它通过使用shift来键入普通收缩来最大程度地干扰正在运行的文本.这种布局大大提高了我在C ++,C,Java和Perl中的打字速度,并在LISP和Python中有所提高.

I suspect this last is probably going to be the most controversial, as it interferes the most with running text by requiring use of shift to type common contractions. This layout has significantly increased my typing speed in C++, C, Java, and Perl, and somewhat increased it in LISP and Python.

推荐答案

我仍然认为键入速度并不是完成项目所花费时间的主要因素.如果是这样,那将是一个大问题(几周的编码可以节省我们大量的计划时间).

I still hold that typing speed is not the main factor in the time it takes for a project to be completed. If it is, there is a big problem (Weeks of coding saves us hours of planning).

关于您的问题,我更喜欢使用标准布局,因为这意味着当呈现标准键盘布局时,我不必花前10分钟就显得愚蠢.

Regarding your question I prefer using the standard layout as it means I don't have to spend the first 10 minutes looking stupid when presented with a standard keyboard layout.

您建议的一些替代品,例如带有特殊字符的第一行没有什么区别,因为另一只手的外指应该同时移动.

Some of the replacements you have suggested, e.g. the top row with the special characters doesn't make a ounce of difference as the outside finger on the other hand should be moving to shift at the same time.

恕我直言,帮助上述链接布局的一件事是仅使用键盘快捷键.建议使用Vim和Emacs.这样可以使文本移动快得多.

IMHO One thing that helps above chaining layouts is using only keyboard shortcuts. Vim and Emacs are recommended. It makes moving text around far faster.

这篇关于编程的理想键盘布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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