Vim and Emacs

Source: Internet
Author: User
Tags ultraedit

 

Emacs and VIM: God's editor and editor God Jiqing Wu
Baidu blog I want to comment (6) Font Size: T |
T

On this blue planet, the legend of two major artifacts is circulating: It is said that Emacs is the God's editor, while Vim is the god of the editor. Some people bravely picked up vim or Emacs, but found that the learning curve was steep and long. Some people left behind and firmly guarded the two artifacts. Some people who say that grapes are too sour want to leave and are unwilling to do so. They always ask: where are their gods?

AD:


    0. Collation: Legend of the arms

    On this blue planet, the legends of two major artifacts are circulating:EmacsIs God's editor, andVimIs the god of the editor.

    The experts and Low-handed people who are dedicated to the world are eager to see them. After seeing their simple and thin interfaces, they can't help wondering: is this an artifact? Even the heart of life is despised.

    Superficial people sneer at me and say, "What's the age? It's a fucking geek! Dear Student, please calm down and let me know: they are indeed old enough and have been in service for decades, but you can think about why such an old editor, but more and more people convert to them.

    In Windows, what are the advantages of ultraedit and editplus? I said: Not in the same day.

    Even students who have never used ultraedit and editplus have asked: Are they equivalent to Notepad on Linux? I said: please disappear from my eyes.

    Some people bravely picked up vim or Emacs, but found that the learning curve was steep and long, so they gave up before finding them powerful. They said: It's too difficult to use, what's better if I use a keyboard as a mouse?

    There are still some people who have stayed to guard these two artifacts. Some people who say that grapes are too sour want to leave and are unwilling to do so. They always ask: where are their gods? I can't help but think of Li zongsheng's lyrics ::

    Someone asked me where you really are,

    Can't I forget it for so many years?

    The spring breeze is no better than your smile,

    People who have never seen you will not understand.

    Maybe you don't know. I still have to talk about it.

     

    Mainstream editor learning curve

    1. Invincible scalability

    1.1 scalability gives the software a powerful life

    Once upon a time, Windows users had no idea about software scalability, and they had to perform very limited customization on the software they used. The rights to extend software are reserved for software developers. If you want new functions and features, you can only wait for updates. A competent user cannot wait. To add the desired function, he wrote a new software from 0. In this way, the new features mean that new software and Windows software are constantly updated. Therefore, software in Windows is short-lived.

    As Linux and open-source software gradually become popular, it is discovered that scalability can give the software a powerful life. Why is eclipse rated as the best IDE in ms? This is because it is the most scalable in IDE. Why does Firefox take away more and more users when IE is almost unified? It is also because of its scalability. Provides a good extension interface, and users will naturally write a variety of plug-ins to meet their own diverse requirements. In this way, the software naturally becomes powerful with the help of users.

    Emacs and VIM have not been eliminated by the times, but become more powerful, because they have unparalleled scalability in countless editors.

    1.2 Emacs is an operating system disguised as an editor.

    To put it bluntly, Emacs is an operating system disguised as an editor. This sentence is not an exaggeration.

    Emacs is actually a lisp interpreter, so it can be flexibly expanded using lisp. What is lisp? It is also very vital.Programming Language. In the era when C language was not invented, when MIT's AI lab was writing its operating systems, some of them were using assembly languages, and some were using lisp. Currently, lisp is still widely used in AI research.

    With such a powerful extension language, Emacs is destined to develop in an omnipotent direction. Gradually, the use of Emacs is no longer limited to writing.Program, Write documents, manage file systems, run terminals, receive emails, access the Internet, and listen to music in Emacs ......, It's really hard to handle. Even some people use the Emacs to control coffee cooked coffee.

    This large and all-round expansion deviates from the Unix philosophy of "one program only does one thing and completes it well", and is criticized by loyal Unix users. But is it true? Does Emacs say that he is an editor?

    It is precisely because of the invincible scalability of Emacs that people cannot tell whether Emacs is an editor. However, some people like this all-in-one philosophy and like to do everything in Emacs. Therefore, some people write "Living in Emacs". Therefore, emacs becomes a belief.

    1.3 Vim is not just vi

    Vim is one of the most popular variants of vi. Apart from inheriting the swift editing method of VI, VIM is much more powerful than the original VI. This is also because it can be infinitely expanded using Vim scripts. There are already thousands of scripts on vim.org, adding a variety of features and functions to vim.

    To prove Vim's scalability is not inferior to Emacs, some users have also written plug-ins that play games, run shell, and integrate GDB for internal debugging in vim. Objectively speaking, Vim's scripting language is inferior to Emacs's elisp, but it does not prevent it from extending Vim into a very good editor.

    After all, Vim's predecessor VI and Emacs adopt different philosophies. VI is more in line with the UNIX tradition. It deals with various building block tools in the system through the pipeline mechanism, it focuses on collaboration with tool programs in the system to complete user tasks. Compared with Emacs, Emacs is clearly positioned as a powerful editor. Therefore, most of VIM extensions are used to better complete text editing tasks.

    Haina baichuan has a high capacity. Emacs and VIM cannot match the scalability of other editors and constantly absorb the wisdom of users, which is one of the reasons they can become "artifacts.

    2. Maverick charm

    2.1 scalability brings you into the soul

    Once you realize the power of vim or Emacs, you will embark on a long journey to continuously explore their potential. You constantly improve your configuration files, search for better plug-ins, or even write your own plug-ins one day. Just like a swordsman who maintains his own sword, you are willing to spend time improving your vim or Emacs. After years and months, you have poured your soul into the sword.

    2.2 The unique operation method has infected you with viruses

    Emacs and VIM have different operation methods, but they have become two representative operation methods in the Unix/Linux world. Some software operations are similar to VI, while some software operations are similar to Emacs, some software even provides VI Key Binding and Emacs Key Binding for you to choose from. Regardless of the operation method, it is odd for Windows users. Although odd, many generations have proved the efficiency of these two methods.

    Emacs claims to be a dead editor by pressing CTRL. In fact, it uses almost all the auxiliary keys. I have never heard of it. emacs = ESC + meta + ALT + Ctrl + shift. So Master Gartner said that operating on Emacs is like playing a pipe organ. Emacs uses many combination buttons, which is probably one of the reasons for its efficiency in other non-mode editors. You can also define your own key combinations and call your own lisp functions to complete the functions you want.

    VI has always been famous for its FAST text editing. Its buttons are more concise, usually a single character button, to achieve some operation. But this is at the cost of a pattern. You need to constantly Press ESC to return the normal mode from its insertion mode. Objectively speaking, VIM is more efficient than Emacs in text editing because it provides some operations that Emacs does not have corresponding functions to assist in efficient text editing. However, some people cannot cope with its mode switching, so those people chose Emacs.

    Whether you choose vim or Emacs, you must work hard to get used to their unique operation methods. This is a process of accumulation of skills. When you get used to vim or Emacs, you will feel overwhelmed. You want to use them to do as many tasks as possible, because you are not used to using other editors.

    Using vim or Emacs is like taking drugs and getting addicted. They will bring you a strong pleasure, but you have given them your soul. At this time, you can only call them artifacts.

    3. Hacker Editor

    Bill Joy, the predecessor of vim vi, and Richard Stallman, the creator of Emacs, are famous hackers in that era. Therefore, the two editors are intended for the first time users who write programs, still. They add more and more support to programming, such as syntax highlighting, smart indentation, keyword complementing, and even integrated debugging. More and more programmers are switching from ide To vim and Emacs.

    What are the advantages of using vim and Emacs for programming? First, I think their efficient editing operations will improve your programming efficiency. Second, you can use them to program in various languages. You don't need to learn how to use different ides because of different programming languages. The upgrading of those huge ides is irrelevant to you. You just need to focus on learning the programming language itself. I heard that both Google and Microsoft do not use IDE for internal development. They also use Emacs or vim.

    Because I don't write many programs, I still can't fully understand the fun of developing programs with vim or Emacs. I just think this is cool. You see, Linus, the father of Linux, has been using microemacs for many years. It has a little more functionality than GNU Emacs or xemacs, but Linus is using it to maintain Linux. Microsoft's Daniel Don box, the father of COM, has been using Emacs. He says no one can take away his editor. He also posted a video on the Internet that he used Emacs to write C # programs.

    The choice of programmers is also one of the reasons why Emacs and Vim are sought after as artifacts.

    4. The holy war triggered by artifacts

    Vim users and Emacs users have a similar taste and should be appreciated. The reality is that vim-Loyal users and emacs-Loyal users are incompatible with each other. Emacs users say that Vim is a single and odd operation method, while Vim users say that Emacs is bulky and starts slowly.

    It is a bit difficult to fight because both of them are at the height of the artifacts. It may also be because the two completely different design philosophy attracts different users in their values.

    Because the two are difficult to compete, newcomers are always hesitant between vim and Emacs, and it is difficult to decide which God to convert.

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.