工具与资源begriffs.com编辑精选
Vim 的历史与高效用法
History and Effective Use of Vim
2019 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这篇文章梳理 Vim 的历史与演变,并讨论如何更有效地使用它:从理解编辑器模式和日常操作,到在默认设置、配置与插件之间做取舍。它更像一份面向长期使用的指南,而不是命令速查表。
为什么经久不衰:它把 Vim 的来历和实用习惯放在一起讲,能解释这些看似古怪的默认设计为何经久不衰,也帮新老用户找到可持续的学习路径。
HN 评论精选
坚持默认键位、少用插件,可以换来跨环境的一致性和省心。
在与 Vim 多年爱恨交织后(我爱它的功能,但讨厌配置它),我顿悟了:坚持默认设置,不管它们是否是我的首选,我就能在任何环境里立刻知道怎么用 Vim。一旦你习惯硬着头皮按 Esc 而不是 jj 或 Ctrl+C,它在哪儿都能用。放弃用无数插件把 Vim 打扮起来的冲动,只用原版,就像编辑器的涅槃。放下欲望,无欲而活 :) 当然这只是我。我理解有人想把 Vim 变成个性化、具备 IDE 能力的强大编辑器,让 .vimrc 一个 git pull 就能同步。但我学会了接受朴素的默认设置,这让生活轻松。
2bitencryption查看英文原文
After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Once you get used to biting the bullet and hitting escape instead of jj, or ctrl+c, it just works, everywhere. If you abandon the urge to pimp out your Vim with a billion plugins, and just use it raw, it's a kind of editor Nirvana. Let go of your desires and live without want :) Of course, that's just me. I understand why someone would want to turn Vim into their personalized powerhouse editor with IDE powers, with their .vimrc a 'git pull' away. But I've learned to live with the humble defaults, and it's made life easy.
:sh 与 Ctrl-d 能在不退出 Vim 的情况下切回 shell;编辑配置时还要注意换行问题。
我从 1998 年开始用 Vim,很少离开,除非给不重要的事情记笔记时会用 Nano。当年做 Unix 管理员时,我们常在满屏终端里工作,编辑配置文件时不喜欢为了查看别的东西而关掉 Vim,于是学到了这个小技巧::sh(回到 shell 做你的事,同时让 Vim 继续运行),Ctrl-d 返回仍在运行的 Vim 实例。另外,如果你决定用 nano 编辑配置文件,务必用 nano -w(不换行),否则可能得到一个无法启动的操作系统实例。
stirfrykitty查看英文原文
Been using vim since 1998 and rarely stray unless I'm typing notes for something unimportant and them I use Nano. Back in the day when I was a Unix admin, we often worked in full screen terminals and when editing a config file didn't like having to close the vim instance to go look at something, so learned about this little gem: :sh (go back to shell and do your thing and leave vim running) Ctrl-d to return to intact and running vim instance. As an aside, if you decide to use nano to edit config files, make sure you use nano -w (no wrap), otherwise you may find yourself with a non-bootable OS instance.
按实际使用中的低效点渐进学习,而不是试图掌握 Vim 的全部功能。
Bram Moolenaar(Vim 作者)2007 年在 Google 的演讲有一些很好的建议。主要观点是不要试图学会 Vim 的一切,而是关注你如何使用它,找出低效或可以更简单的地方,然后去研究如何让 Vim 更高效地完成那件事。
anaphor查看英文原文
This video of a talk that Bram Moolenaar (the author of vim) gave at Google in 2007 has some pretty good advice. https://www.youtube.com/watch?v=eX9m3g5J-XA Mainly the idea is to not try and learn everything about vim, but instead pay attention to how you use it, and find things that are inefficient or could be easier, and then go figure out how to make vim do that thing more efficiently.
Vim 肌肉记忆太深,而 IDE 的 Vim 模拟往往缺少录制、可视模式、正则、缓冲区等关键功能。
我用 Vim 几十年了,每次想换掉都彻底失败。我太想念它的一切。唯一真正的抱怨是我很难用 IDE,因为我的 Vim 肌肉记忆太强,尽管很多 IDE 提供 Vim 键位绑定,但它们从没提供我常用的全部功能/按键。经常缺失的是录制/回放、可视模式、锚点、Vim(独特)的正则语法、缓冲区操作等。
DoneWithAllThat查看英文原文
I’ve used vim for decades and have utterly failed at switching away every time I tried to. I miss everything about it too much. My only real complaint is I have a hard time using IDEs, because my vim muscle memory is too strong and despite many offering vim key bindings they never offer all the features/keys I typically use. Often missing are recording/playback, visual mode, anchors, vim’s (unique) regex syntax, buffer manipulation, etc.
历次讨论
同类还值得读
直接在浏览器中启动 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