Don't touch me, VIM-general Linux technology-Linux programming and kernel information. The following is a detailed description. Source: cnbeta.com
Everyone said that VIM is a master. If I say no, just take a look at the program image. It is simply an editor used by peerless experts. I spent the middle of the night, but I was overwhelmed by it. Therefore, I will not list its usage for the sake of happiness of my friends. In fact, the biggest reason is: Sorry, I have not been able to learn the legendary martial arts.
It is said that VIM (editor) + GCC (compiler) + GDB (debugger) is the most common development tool chain in Linux. I was infected by VS2005 myself. I am not used to VIM, GCC, GDB, and how can I write programs in Linux. Experts seem to like to use VIM with a lot of plug-ins to write programs. According to the practice I have seen, I want to have smart complementing functions like, VIM needs Ctags (this is a long string of commands) first, then enter a few letters and then press the Tab key (requires the SuperTab plug-in) to generate a smart prompt.
This is not the most important thing. In VIM, to delete a line of words, press d twice, delete a word, and then press x. And a long list of commands that need to be remembered, for example, gg is at the beginning of the article, shift + 4 is at the beginning of the line, and so on. I unconsciously remembered the WPS that I learned during the summer vacation in the fifth grade of primary school. I had to input a lot of instructions to output a neat document. It seems awesome to others. Now I will use Office2007, not just you and me, right? As for the many WPS control commands that I learned at that time, there were also five pen fonts, and I forgot them all now.
I am definitely not a memory-intensive person. The handsome guy picked up a Ubuntu and skillfully knocked on a bunch of commands that I couldn't understand. I was dazzled. In Linux, what is the biggest headache for me is that I have to input a command first for everything. Then? Help. Otherwise, you will never remember how the command is used. At the beginning, I also said that this is a hard time in the learning stage. After trying more, I will feel that this is really a tough task.
You said, why don't I write a gui for a good software, so I have to knock on the command to remember what each parameter means, and why I don't write a gui for a good configuration, I had to study the entire configuration file to know where to modify the configuration parameters.
They said: Unix philosophy is: a program only does one thing and does well. But I don't know why, the software authors in Linux seem to be too reluctant to write a gui, or they think they only need to do the Software Logic well. As for the gui, according to the simple principle, it should be done by others who are interested. In fact, I think there are two reasons: one is that there is no powerful development tool (you can write a gui by dragging a controller like C #), and the other is that programmers are also lazy.
Why is there no powerful development tool? Why is there no powerful tool like VS in Linux? Let me start with VIM + GCC + GDB. VIM is hard to say. in GCC, if you have to manually write a makefile on your own, I have never tried GDB. It is said that there are also some graphic interface debugging tools, you can press the shortcut key like VS to debug it (this must be configured for N years). I have read a GDB user manual and remember many Debugging commands, I think I am about to crash.
As mentioned above, "one program only does one thing and completes well" has caused many drawbacks. The most visible one is dependency.
I believe that the GCC version is A very painful thing to know when developing it in Linux. Some programs require GCC compilation of Version A and some programs require GCC compilation of Version B, version numbers cannot be updated at a high point or a low point. With the corresponding header file library version number added, do you feel crazy. Quietly, I will tell you that Linux is developing fast now and the version number keeps changing, so you can go crazy.
For example, A maintains A program A, B maintains A program B, and the two programs are dependent on each other (possibly, B is the gui of program ), suddenly, the author of B wants to travel around the world without continuing to develop program B. If the interface changes, then the program B is useless. As a user, you can either blame others or help B continue development.
The open-source mode undoubtedly has many advantages, but its shortcomings have not been taken into consideration. Open source means that the source code is open and everyone can modify and submit the code. But in actual situations, it is more horizontal than vertical. What I am talking about is horizontal development of supporting software, vertical refers to more in-depth development of software. Because the horizontal structure is easy, you only need to know the corresponding interface, and you need to read the source code in the vertical structure.
Continue to explain why heavyweight applications such as VS cannot appear in Linux. VIM + GCC + GDB can implement the VS function, which can be coded, compiled, and debugged. But why are they not VS together? Because there is no architecture.
Now, the open-source development model is still outdated. The concept of software engineering has been put forward for decades. However, when you want to gain an in-depth understanding of an open-source software and download its source code, you will find it sad: you cannot find any corresponding development document. All that helps you understand the source code is the comments in the program source code.
If you want to build an IDE that is better than VS in Linux, you need to use VIM, GCC, and GDB. What kind of work do you want to do? Take a small development as an example. I don't care how the Intelligent Code prompts in VIM come from (so far I still don't know how to write the function name and prompt me the parameter list). Do I need to compile the code after I have worked hard? If a compilation error occurs, GCC prompts you where the error is, and displays a row number indicating the error and error. Do you want to quickly locate the error? Sorry, GCC says that I am a compiler, but VIM is an editor. But I have to know where the error is, right? Who gave me this positioning parameter? GCC can only output information, but it cannot realize the existence of VIM. At this time, you have to write an adaptation interface, convert the GCC output information, and submit it to VIM. VIM then jumps to the error location. Of course, there are some VIM plug-ins called quickfix.
There are many such problems. VIM, GCC, and GDB are basically unrelated software. To enable them to communicate, you must write a lot of adaptation programs, to write an adaptation program, you must consider the VIM interface, the GCC interface, and the GDB interface. In VS, this is a well-designed architecture. interfaces between different modules have been defined, and the data transmitted between them is also defined. Do you want to communicate? Simply transfer a variable in the memory. In the communication between VIM + GCC + GDB, data transmission is very troublesome. Sometimes it is amazing to write and read the hard disk?
Because there is no architecture, it is necessary to write a lot of adapters to integrate them. Some of them are functions that the adapters cannot do or are not doing well enough. For example, the smart prompts of the Code just mentioned, there are indeed VIM plug-ins available for you to do, but if you have read the cloud flow of VS when writing C #, you will know that those plug-ins are far from doing enough. This is not a plug-in issue, but the VIM + GCC + GDB are not cohesive at this cohesion. Of course, this is not an internal task. They are not intended to be IDE. At this time, you will think that "a program only does one thing and does it well" is absolutely good?
After you know that there is no architecture, you may think, if there is an architecture, can you make an IDE like? This requires consideration of the software engineering level of open-source developers. In my opinion, there are still many open-source developers who basically do not have the concept of software engineering. In reality, you can ask a developer to develop your documents according to your ideas, because you have mastered his salary. In the network, there is no concept of software engineering development, and they will not learn a new discipline. There are all kinds of software engineering development models. We are only interested in open source, no Ye is left here. What do you use to manage developers who do not want to be bound?
Unless there is an architecture, and VIM, GCC, and GDB follow the architecture, there will be no IDE like. But is it possible that the open-source community is almost isolated from each other? So I asserted that there could not be heavyweight applications like VS in the Open Source world.
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