«

VIM 是怎么一步步变的如此受欢迎的?

时间:2022-7-9 22:35     作者:独元殇     分类: 翻译


You probably heard of Vim, the almighty text-editor that is everywhere and a place where people get trapped from time to time. If you are hearing from your local DevOps engineer how Vim is excellent and fast, you probably thought about giving it a try. But how did it come to this? How did Vim-craze take over the world at some point?

你大概听说过 VIM,全能文本编辑器,这是个一次次的让人们掉进去的陷阱(怎么退出 vim....哈哈),如果你听你的运维工程师同事说 VIM 怎么怎么优秀怎么怎么飞快,你大概很想试试。但它是怎么变成这个样子的?为什么在一些方面能掀起全球性的 VIM狂热潮?

If we look at the StackOverflow survey for 2019 about the most popular development environments, Vim is still there on the 5th place, with around 25% of Web Developers using it. Fifth place is pretty neat considering the first Vim release happened almost 30 years ago (yeah, you read that right, Vim got first released in 1991).

在 2019 年 StackOverFlow 评选的开发环境排名中, VIM 依旧在前五,有 25% 的 web 开发者在使用。对于一个发行了有 30 年的 VIM,第五名这个排名确实很漂亮。

To better understand why and how Vim got (and is) so popular, it is best to look into the roots of how it all started. Before vim, there was vi, before vi there was ed. What are all these two or three letter words, and what is the story behind it? Let us dive in and figure out.

为更好理解为何 VIM 如此受欢迎,最好的方式是寻藤摸瓜,看看它是咋开始的。在 VIM 前,有 VI,在 VI 前,有 ed。这些两个三个字母的是啥?背后隐藏什么故事?现在我们拨开迷雾,寻找答案!

Punch cards and line editors

打卡时代和线编辑

It might be apparent today why we have text editors and fully-fledged IDE (Integrated Development Environment), but what did we have before that? As you may know, early forms of programming involved putting papers with holes (punch cards) inside a computer. The order in which you placed these in was very essential. For example, this is a picture of 4.5 megabytes data, stacked in 62500 punch cards. Imagine dropping that and having to sort it again.

当然,我们为什么有文本编辑器和全能 IDE (集成开发环境)?这没啥可说的,但我们在这之前用的啥?你可能听说过,最早的编码需要在计算机里往纸上打孔(打卡时代),你放置的那些位置顺序是非常非常重要的。举例,这是个 4.5MB 大的图片。需要 62,500 盘纸带,想象一下删掉这图片,然后再来进行排顺序的场景......