我以前用nano来编辑文本,但后来改用vim,它更强大。如果我迁移到 emacs,我会获得同样的能力吗?

发布于 2024-10-16 17:10:55 字数 339 浏览 8 评论 0原文

大约三年多的时间里,我认为我所需要的只是纳米(从技术上来说确实如此)。在我尝试之前我并不理解所有关于 vim 的喧嚣。尽管学习曲线略高,但它极大地简化了我的编码,我不会梦想回到 Nano。

然而,我多次听说 emacs 是最难学的,但对程序员来说却是最有用的编辑器。任何通过文本编辑器采取类似发展道路(并发现自己目前选择 emacs)的人都可以告诉我它的优势是什么吗?

现在我对 vim 的看法与我之前对 nano 的看法相同,即:边际效用是否足以证明投入时间学习?从 nano 切换到 vim,答案显然是肯定的(无论如何对我来说)。如果我学习了 emacs,我会回过头来对 vim 说同样的话吗?

For about 3+ years, all I thought I needed (and technically that was the case) was nano. I did not understand all the hoopla about vim until I tried it. Although the learning curve is ever-so-slightly higher, it has greatly simplified coding for me and I would not dream of going back to nano.

I have, however, heard many times over that emacs is the most difficult to learn, yet most useful editor for a programmer. Can anyone who has taken a similar path of evolution through text editors (and find themselves currently choosing emacs) tell me what the advantage is?

Right now my view on vim is the same as my previous view on nano, which is: Will the marginal utility be great enough to justify putting in the time to learn? With switching from nano to vim, the answer is an obvious yes (for me anyway). Will I look back and say the same thing about vim if I learn emacs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

猫九 2024-10-23 17:10:55

我才开始使用 EMACS,但我的继承是这样的 - 我们的本地编辑器(MSU 自制),然后我使用 vi/vim 几年,有时甚至使用远程编辑器,最后 3 年前我换了到EMACS。基本命令学得很快,然后在你的余生中你只需掌握它,每天都会发现做某事的更快方法。对于 EMACS 的第一步,有非常有用的教程。获得LISP的基础知识也很快,只需定制即可。但 EMACS 中还有一个用户界面,可以更改首选项并将其自动写入选项文件。

我必须承认我还没有尝试过 vim 的现代功能,我听说在程序员使用的功能中 vim 和 emacs 非常接近。所以最终这将是一个品味问题——使用两者中的哪一个。就我个人而言,我更喜欢 LISP,而不是 VIMscript:)

可能会有人从 vim 更改为 EMACS,反之亦然 - 他们对优点和缺点的看法会比我更成熟。

I have only started to use EMACS, but my succession was like that - our local editor (home-MSU-made), then i have used vi/vim for several years or sometimes far editor, and finally 3 years ago I've switched to EMACS. The basic commands are learned quite fast, and then the rest of your life you just master it, every day discovering the faster way to do something. There's quite useful tutorial for the first steps in EMACS. Obtaining basic knowledge of LISP is quite fast too, just to customize. But there's also a user interface in EMACS to change preferences and automatically write it to the options file.

I must admit that i have not tried the modern capabilities of vim, I've heard that in functionality employed by a programmer vim and emacs are very close. So finally it shall be a matter of taste - which of the two to use. Personally i more like LISP than VIMscript:)

Probably there will be someone who has changed from vim to EMACS or vice versa - their opinion about pros and contras will be more mature than mine.

饮湿 2024-10-23 17:10:55

我将在这里添加一个简短的轶事。几年前,我从 Vim 过渡到 Emacs,从 Viper 和 vimpulse 开始,现在主要使用标准 Emacs 绑定。我的动机是学习 Lisp,而 Emacs 是一个很好的环境。如果您确实想使用 Emacs,我推荐 emacs 入门工具包。它包含用于编码工作的有用设置。

对我来说,一个重大转折点是找到了一个可行的修改键物理键盘映射。我最终将 Alt 键映射到 Ctrl,将 Alt 旁边的键映射到 Alt(Emacs 的 Meta 修饰符)。我对所有东西都这么做了,不仅仅是 Emacs。这让我可以用相反的拇指按下修饰键,而且现在我已经习惯了,我可以像在命令模式下键入 vim 键一样灵活地键入 Emacs 键和弦。当我第一次开始使用 Emacs 时,我认为这是不可能的。

Emacs 生态系统有很多深度,它确实是一个需要定制甚至个性化的环境。我发现它是用户友好的软件,因为它实际上使用起来很有趣,尽管有时令人沮丧,但它似乎总是有价值的。当然,这是一个个人故事,我怀疑对我有效的方法也适合每个人。正如其他人所说,您必须通过反复试验来学习。

I'll add a short anecdote here. I transitioned from vim to Emacs a few years ago, starting with Viper and vimpulse and now using mostly standard Emacs bindings. My motivation was in learning Lisp, and Emacs is a great environment for that. If you do want to play with Emacs, I'd recommend the emacs starter kit. It contains a useful setup for coding work.

One major turning point for me was arriving at a workable physical keyboard mapping for the modifier keys. I ended up mapping my Alt keys to Ctrl, and the keys right next to Alt to Alt (Meta modifier for Emacs). I did this for everything, not just Emacs. This allows me to press the modifiers with opposing thumbs, and, now that I'm used to it, I'm able to type Emacs key chords with the same dexterity that I once typed vim keys in command mode. When I first started with Emacs, I didn't think this would be possible.

There is a lot of depth to the Emacs ecosystem, and it is truly an environment that invites customization and even personalization. I find it to be user-friendly software in the sense that it is actually fun to use, though at times frustrating, it has always seemed rewarding. Of course, this is a personal story, and I doubt what works for me is for everyone. As others have said, you'll have to learn by trial and error.

凑诗 2024-10-23 17:10:55

我建议尝试一下 Emacs,也许使用 viper 模式和 vimpulse 来减少学习基础知识时的学习曲线。

http://www.emacswiki.org/emacs/ViperMode

还有很多关于 vi 的其他资源Emacs Wiki 上的用户。看看周围。

I would suggest just trying Emacs out, and perhaps using viper mode and vimpulse to lessen the learning curve while you are figuring out the basics.

http://www.emacswiki.org/emacs/ViperMode

There are plenty of other resources for vi users on the Emacs Wiki. Have a look around.

挽梦忆笙歌 2024-10-23 17:10:55

不,你不会获得同样的力量。你将获得更好的力量! :) 有很多 emacs 与 vim 的争论。 AFAIAC 毫无争议 - emacs 轻而易举地获胜。

No you wont get the same power up. You'll get a better power up! :) There are a lot of emacs vs vim debates. AFAIAC there is no debate - emacs wins hands down.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文