我正在寻找以聪明的方式学习 Vim 或 Emacs 的技巧 [英] I am looking for tips for learning Vim or Emacs the smart way

查看:28
本文介绍了我正在寻找以聪明的方式学习 Vim 或 Emacs 的技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Eclipse 的一个非常满意的用户(我主要使用 PHP 和 Python 进行开发),但是我找到了"很好地解释了我认为的优势.我认为确实值得一试,即使学习曲线可能比其他编辑更陡峭,而且听起来你带来了必要的动力.

回到边做边学.

我希望我第一次做的事情:

查看 Vimtutor.这是一个交互式教程,通过展示 vim 的基本命令以及如何组合它们来展示 vim 的强大功能.只需在终端中输入 vimtutor.

在过去几次尝试学习使用 vim 编辑之后,这帮助我真正get it".该教程极大地简化了学习曲线,因为它解释了命令并让您实际执行它们,从而使它们成为一种习惯.与因为感觉残疾而感到沮丧相比,这真的很重要.使用 vimtutor 你也会看到模态编辑的好处,而不是抗拒或忽视它,你会接受它,因为你亲身体验了它的优势.我想这一切都很难自学.所以这 30 分钟是非常值得的.

I am a quite happy user of Eclipse (I mostly develop in PHP and Python), however I found the answers to "What specific productivity gains does Vim/Emacs provide over GUI text editors?" interesting enough to make me wish to try out Vim or Emacs as well and see if they would turn out to be a better solution for me.

I have the general feeling that Vim and Emacs are not the kind of editor you learn by "playing with it" though. I have the impression you must dedicate some time and effort to "study" them a bit, before you can benefit from their power.

So, I have two questions for the community:

  1. In the linked thread responders have essentially answered by commenting on Vim (often mentioning: "I'm sure Emacs has the same"). Google trends seems to indicate Vim is the mostly adopted between the two, however my first question is: knowing that I have no prior experience whatsoever on any of the two, and that I use and develop (mostly PHP and Python) on GNU/Linux systems (Ubuntu, Arch Linux), is there any of the two which would represent a better option to start with? (To be clear: my question is not about the quality of the editors but it is about what it is strategically better to learn in my situation).

  2. What advice would you give me on how to learn using it/them? I know this is a broad question, but it is deliberately so. Have a look at this answer (unrelated topic) for an idea of the kind of information / style of answer I am looking for [but do not feel obliged to answer that way... any contribution will be welcome, in any form!]

EDIT (on picking the "accepted answer")

I picked one answer as the accepted one just now, but I would like to say "thank you" to all those who shared their experience and advice: almost all of it has being useful to me in some way. The thread has definitively exceeded my expectations! Thank you! :)

解决方案

I would advise that checking out both is worth the time because of various reasons already covered by other answers or "Emacs vs vim vs XY" threads.

Still if you would have to pick one of them I'd go with vim because of one thing:

Availability

Vi(m) has the advantage that it is installed (not only available) by default on almost any *nix system. So no matter whether it is your system or someone else's or whether you are allowed to make changes to it or not, your favorite text editor and friend is there waiting for you.

Once you know vi(m) it feels awesome in those situations where you ssh into a machine and need to do something with text (navigating through a file, editing, whatever). You are going to feel like a King. I remember several times when I almost freaked out because nano or pico were not installed and I had to use "this ugly beast vi" which made unpredictable things when I started typing (because I wasn't in insert mode and didn't even know what that was) and when I was happy to have googled that ":wq!" gets me back out of hell. Now I can look back and smile about it.

I have the general feeling that vim and emacs are not the kind of editor you learn by "playing with it" though

Vim and Emacs are certainly editors that you "learn by doing".

Of course the question cries for including these highly scientific text editor learning curve graphs =)

Vim might be a bit harder in the beginning because its modal editing can feel quite unfamiliar at first. I think motivation is the key here. The article "Why, oh WHY, do those #?@! nutheads use vi?" explains the advantages quite well I think. In my opinion it really is worth to give it a try even while the learning curve might be steeper than with other editors and it sounds like you bring the necessary motivation.

Back to learning by doing.

Something I wish I would have done the first time:

Check out Vimtutor. It is an interactive tutorial which demonstrates the power of vim by showcasing it's basic commands and how they can be composed. Just type vimtutor in your terminal.

This helped me to really "get it" after trying to learn editing with vim several times in the past. The tutorial eases the learning curve dramatically as it explains the commands and makes you actually perform them so they become a habit. It really makes a difference compared to being frustrated because of feeling handicapped. Using vimtutor you also will see what the benefits of modal editing are and instead of fighting or ignoring it you are going to embrace it because you have experienced the advantages at first hand. I guess it would be pretty difficult to learn that all by oneself. So these 30 minutes are quite worth it.

这篇关于我正在寻找以聪明的方式学习 Vim 或 Emacs 的技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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