工具与资源stackoverflow.com编辑精选
你对 Vim 的问题在于你不懂 vi
Your problem with Vim is that you don't grok vi
2011 — 2021,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 Stack Overflow 上一个关于 Vim 高效技巧问题的经典回答,核心观点是:Vim 的本质不是一堆快捷键,而是一门可组合的编辑语言——动词(如 y、d、c)搭配对象(如 w、i()形成句子,理解这一点才能真正用好 vi。该回答多年来反复登上 HN 首页,被视为 Vim 学习的必读文章。
为什么经久不衰:它把 Vim 从“背命令”重新定义为“学语言”,这个视角让不同年代的读者都能豁然开朗,至今仍是理解模态编辑器思想的最佳入门。
HN 评论精选
学习 Vim 前期痛苦但回报像复利,值得长期投入
很多唱反调的人忽略了一点:你不会读完一本 Vim 书(甚至这个回答)就立刻用上所学。这需要时间,起初还很痛苦。但这就像正确握网球拍或钢琴指法——默认方式当然最舒服,但走更难的路带来的回报如同复利。
dionidium查看英文原文
One thing I think a lot of the naysayers here are missing is that you don't sit down and read a book on vim -- or even this stackoverflow answer -- and immediately expect to begin using all you've learned. It takes time. And it's painful at first. But it's a lot like gripping a tennis racket correctly or properly positioning your fingers at a piano. Your default method is indubitably the most comfortable -- by definition -- but the payoff of attempting the more difficult path can be likened to the magic of compound interest.
反方观点:要记的东西太多,不值得再学 Vim
恕我直言,我真不理解它的吸引力。我已经要记太多晦涩知识了:两种语言的 .Net、各种方言的 SQL、HTML、JavaScript……人能记住的东西有限,零碎知识查一下更省事。为什么要主动用一个我上学时就已过时的编辑器?:q! 是我唯一要记的命令。
eftpotrm查看英文原文
Flame suit on, but I really don't understand the appeal. I have reams of arcane bits of information to commit to memory already. .Net in two languages plus VB6 for legacy code. SQL in more dialects than I care to list, each with their own quirks and limitations. HTML and JavaScript. XML and various associated technologies like XPath. That's just professionally; once I go home I can add in photography and music straight off with others at different levels. There's only so many things one can usefully commit to memory (edit - yes, I meant am prepared to dedicate the time to committing to memory); odd bits are just easier to look up. So why, exactly, should I voluntarily use a text editor whose interface was already far behind the state of the art when I started school? :q!. I've had others try to persuade me of the joys and power of vi; I'm not even slightly convinced and that is the one command I'm committing to memory.
按键效率未必是瓶颈,思考成本同样重要
也许不是这样。效率衡量的是完成事情所需的时间,“琢磨怎么做”有时比“按键次数”更是真正的瓶颈。
Triumvark查看英文原文
> I've often done things iteratively and interactively that could probably have been done more efficiently if I'd taken the time to think out the correct incantation. Maybe not. Efficiency is a measure of the time it takes accomplish something. 'Puzzling out how' can sometimes be a more relevant bottleneck than 'number of keystrokes.'
老手也受益,这个回答能改变使用 Vim 的方式
第一个回答太精彩了。我已经 exclusively 用 Vim 好几年,只是粗读这个回答,可能就永久改变了我使用 Vim 的方式。
BenjiWiebe查看英文原文
That first answer... Is amazing. I have used vim exclusively for several years now, and just skimming the first answer has probably changed how I use vim forever.
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com