⬆️ ⬇️

Top 10 pitfalls that you may stumble upon while moving to Vim

Agree, every time you see a person who uses Vim, it seems to you that he knows something that you do not know. Otherwise, how can you explain the fact that it uses an editor that you think is open-source garbage? Think what you want, but there are a number of reasons why programmers worship Vim.

As long as you do not spend at least a month on getting to know him, you will undoubtedly hate him. It is for this reason that most newbies work with Vim for about a day, after which they never touch it again. They cannot even imagine what incredible speed and flexibility it possesses. All you need is to find the strength in yourself and overcome the difficulties that you will encounter throughout the time that you become acquainted with Vim.





A huge number of modes



Yes, that is right. Vim is an unusual and non-standard text editor (it is much better than others!). The transition from, say, TextMate to Vim is more complicated than the transition from TextMate to Espresso. Always remember this. Especially when you tear the hair on your head because the text you are typing does not appear in Vim.

Despite the fact that Vim has a huge number of modes, we consider only three of them, which are the most important. But before we begin, remember that in Vim one key can perform different functions, depending on what mode we are in. What is even more confusing - capital letters perform other functions than lowercase letters.



In command mode, pressing i will invoke insert mode. However, pressing I will move the cursor to the beginning of the line. It may sound very strange, but this is where his incredible power lies.





')

I know that all this sounds very strange, but it is really convenient and very fast. Like instant noodles. Only much tastier ...



Vim - the editor of our ancestors



You could often hear from your friends questions like, "Isn't Vim a dull old DOS era?"

Yes, in fact, they are right. Its development has been going on for the past 30 years. And yes, he is older than me. But despite all this, he is in a state of active development. The latest release, version 7.3, was released in August 2010.



I love snippets in TextMate



One day, you will find that Vim does not have “out of the box” such functionality as snippets. However, you can add this functionality by installing a plugin called snipMate .



I can not use the "arrows"



This is a blatant lie. In Vim, you can safely use them as you wish. Usually, the functionality of these “arrows” is assumed by the keys h , j , k , l , which move the cursor to the left, down, up and, respectively, to the right. This is the case for some reason:







I'm a designer dude



Yes, yes, I know. Vim can't suit everyone. It really is. A person who from time to time is engaged in design is well aware of this.



The programmer is not a designer. This is the only reason why the choice of their editor is different.



Days away, editing HTML and CSS, you will understand that Vim is not what you need. With this fact you can not argue. Just find the editor you like. Such as Coda , for example.



Vim does not offer something new and unusual



You know, I do not really need it. Each editor has his strengths. Over time, you will realize that Vim is a very fast and flexible editor. If you definitely lack some functionality, you can install the plugin, of which there are thousands now.

Many newbies have noticed the fact that Vim allows you to quickly replace the value in quotes. In the same great miracle it was for me. Suppose we have the following code snippet:



puts "Hello, world!"


, , , , , . Vim . ci", .



vimrc



. Vim, , -: , … ! Vim, vimrc, . , vimrc .





. , GUI. GUI Vim. :





. . Command + F Command + W , .



Vim



, , . . . Venturing into Vim . , , . , , Vim. , .



,



. , « », , , . , Transmit FTP.

, Control +U.



, Vim. , . , Vim. — ?

Source: https://habr.com/ru/post/143175/



All Articles