Home  >  Q&A  >  body text

vim - 为什么要使用IDE

见周围的人编程都是用一些IDE工具, 比如visual studio或者Eclipse等, 但是我觉得用vim或者emacs完全可以啊。

想问下大家IDE相对于传统经典的编辑器vim(emacs)有哪些优点。 我不想让大家在这里为IDE和vim(emacs)发生口水战, 因此只想让喜欢IDE的人说说IDE相对于vim(emacs)的强大之处即可。

如果你认为IDE和vim(emacs)在不同的场合发挥作用不一样, 我也欢迎您回答。

ringa_leeringa_lee2696 days ago760

reply all(6)I'll reply

  • 高洛峰

    高洛峰2017-04-21 10:59:14

    IDE can provide you with shortcuts for tedious things you often do. And it has its own optimization for specific languages ​​or frameworks.

    For example, when I write Java Code, I often use Eclipse and Intellij to complete refactoring. I can modify variable names within the scope of a function, find all classes that implement a certain interface, automatically generate JavaDoc comments, and let it automatically analyze it for me. But Forgot to add annotations such as @Override, or even modify the class name and modify the file name at the same time, modify the package where the class is located and move the file at the same time, etc.

    For example, when I write Objective-C, I need to use UIBuilder to design xib or storyboard files...

    It’s not that emacs or vi can’t do these things, it’s just that IDEs are definitely better at supporting specific functions of a specific language.

    Generality and Speciality cannot have both.

    Of course, I usually use vi when writing C++ and Python (non-Django) code. My own principle is that I don’t pick tools. I use hammers to knock nails and scissors to cut paper. In some cases, scissors can also be used to knock nails. But if you want to do your job well, you must first sharpen your tools. Choose the right tool. Utensils, and then use them very familiarly, very familiarly, very familiarly.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-21 10:59:14

    Let me explain it in a simple way. Your question is similar to "Why do humans take cars?"

    Human beings have two legs. They can walk through streets and alleys, climb mountains and stairs, and they can go anywhere without any disadvantage. They have zero fuel consumption, start quickly, and have no dead ends. Why do we still need to take a car?

    Why?

    There are high technologies that can improve the quality of programming life, why not use them?

    Okay, I know some people will think again: Isn't it a necessary quality for programmers to be proficient in using 2B Pencil and VIM/Notepad to write programs without relying on IDE?

    Quality is one thing, work habits are another. Is hiking 10 kilometers a day a necessary physical fitness for a normal young man who masturbates every day? Obviously yes, but how many people have you seen walking 10 kilometers to work every day?

    Notepad is like your legs, and vim/emacs is like a motorcycle. It has a motor, is lightweight, has a small displacement, has low fuel consumption, can easily carry a girl to work, can accelerate from 100 kilometers to 100 kilometers quickly, and is cheap. . IDE is like a family sedan. It is more comfortable than a motorcycle (it has a sunroof and a cigarette lighter) and it is safer (it has airbags and can be equipped with child seats). Unfortunately, the purchase and maintenance costs are also higher, bulkier, and scary. Traffic jam.

    An IDE like Eclipse is like a Dongfeng truck, which is essentially a truck; add a roof and a bed to the cabin, and it becomes a RV; install two rows of seats and it becomes a troop carrier; pull two generators and it becomes a power generation vehicle; Pull a radio repeater and it becomes an emergency communications support vehicle.

    If cars and motorcycles have the same price, everyone has a one-story garage, there are no traffic jams in the city, there are parking spaces everywhere, and there are no small alleys that cars can’t enter, who would still use motorcycles? It is precisely the existence of these ups and downs that lead to the complementarity of editors (vim/eclipse/editplus) and IDEs.

    By the way, the IDEs produced by jetbrains are all artifacts, high quality and low price, you deserve them, haha

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-21 10:59:14

    vim (emacs) is a coding tool inherited from tradition, and programmers who came from the console era feel more familiar and accustomed to it. The IDE is an intuitive and simple coding tool developed with the graphical interface. There is no distinction between which one is better or worse, only whether it is familiar or not, habitual or not, and personal use is efficient or not.

    Compared with vim (emacs), which uses shortcut keys/commands to quickly achieve your coding goals, IDE provides an intuitive/visual command method to complete coding. Simply speaking, in terms of coding speed, convenience or not, I think the two are comparable. Some people may think that IDE can provide rich extensions, but vim (emacs) is not inferior as long as you configure it well.
    In addition to these, I think the biggest advantage of IDE is: Low learning cost. Don't underestimate the cost of learning. In the final analysis, companies want to see the results of your work. For programmers, the most direct demonstration is that you can quickly complete coding work. Today, when GUIs are very popular, if a Java programmer is asked to complete a certain coding job [prerequisite: he has only heard about vim (emacs) and eclipse, but has never used them], who is the most adaptable to the programming tools first? I think The result should be that Eclipse has a better chance of winning! It is not a simple thing to configure vim (emacs), but as soon as eclipse is opened, many people should be able to start writing code.
    In addition, another great advantage of IDE: Integrated project management. Today's IDE, similar to VS, eclipse is no longer just a programming tool, but a powerful tool that includes project life cycle management, including project creation, coding, compilation, integrated deployment, release, etc. . And I secretly think that this is what attracts me most about IDE.

    reply
    0
  • 迷茫

    迷茫2017-04-21 10:59:14

    The difference between using an editor or an IDE and the difference between an editor and an IDE has nothing to do with it. The only thing that matters is what kind of state do you want to achieve?

    It is very easy to get a driver's license now. Any aunt selling vegetables on the street might have a C license. This is entirely due to the advanced "automation" in modern cars. In the past, drivers had to get a driver's license. But it’s very troublesome, and maintenance and repair of vehicles is a must. Today, when the number of 4S stores has basically surpassed that of public toilets, how many drivers can understand what the structure of the clutch is? Let alone maintenance and so on. But you can say that the birth of modern times Are the drivers better than the previous ones? Or are the previous drivers not as good as modern drivers?

    Of course, today with highly developed infrastructure, you can say, "Why should I spend several years learning to repair cars? I just want to drive. I can spend the time learning to repair cars on how to drive better." But In this way, you can't break away from those infrastructure construction circles. What if you have walked all the known roads and you want to go to an unknown place, a place where there are no 4S shops? Learn to repair cars from scratch?

    It doesn’t matter if you want to drive in circles drawn by others for the rest of your life. But if you want to be a top driver - a racing driver, you can’t always rely on automatic transmission, ESP, or reversing radar. .And racing drivers don’t drive mass-produced models.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-21 10:59:14

    IDE is an integrated development environment, and configured vim and emacs are no different from IDE.

    Enterprise-level IDEs like Eclipse require less time to configure, but have low degrees of freedom. Lightweight tools like vim and emacs are relatively complex to configure but have a higher degree of freedom.

    Preferences for these two types of tools vary from person to person. There are no best tools, only the best programmers, right?

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 10:59:14

    One thing I envy most about IDEs is that WebStorm can support the refactoring of JavaScript (the latest version already supports CoffeeScript). My Vim cannot, and neither can my Emacs.

    You may say that I can write a plug-in to support it. I have already done this, but the reconstruction tools for analyzing text and analyzing semantics are different, right?

    reply
    0
  • Cancelreply