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.
- Command mode By default, Vim is in this mode. You can view it as a mode that waits for a command and switches the editor to the appropriate mode.
- Insert mode You can enter it by pressing the i key in command mode. This mode is intended mainly for pasting text (from the buffer, or by printing). When all the actions you need are completed, go back to command mode.
- Visual mode You should consider it as a mode with which you can navigate through the text. And not only ... In a regular editor, in order to delete five lines of text, you need to select them with the mouse, and then press the Backspace key. In order to do this in Vim, you need to perform just a few actions: press V to go to the visual mode, type 5j to highlight the five lines you are looking for and finally press d to delete the selected text.
')
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:
- Lack of choice. Imagine that you returned a few decades ago, when the shooter PC was not there. Instead, the document was navigated using these keys.
- Less mobility. I do not like to be distracted. Imagine that you need to select a part of the text and for this you have to ... get distracted and reach for the mouse. The Vim approach allows me not to be distracted by it once more and to keep my hands constantly above the keyboard.
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. — ?