Why a 21st Century Vi-Ax

I don’t remember when and under what circumstances, but somehow very long ago I discovered Git. At first, I didn’t quite, of course, understand its advantages over other version control systems, but by the time I got tired of TFS, which we used at the company at that time, I decided to try it.

Git won my love very quickly and since then I can not even imagine my work without it.

Once, while playing and trying different teams, I accidentally started the editor mode, and Git, as it turned out, used Vim by default, which I had never seen before. Well, how does the first acquaintance with this editor usually take place? That's right - with bewilderment and rebooting the terminal. It’s trite - I couldn’t leave the editor and honestly, I even thought that the editor was stupidly buggy. I even remember somehow wondering - how the hell did it happen that such smart dudes who created such a powerful thing like Git could choose such an archaic, dumb, incomprehensible and ugly (as it seemed to me at first) editor?



But then I became curious, I began to delve into. Frankly, the path to overcoming your own laziness and acquired habits was not easy and very long. But I have no regrets about the time spent and the nerves. Now I use (and used) Vim mode almost everywhere it is possible - WebStorm / RubyMine / PyCharm, Sublime Text, Visual Studio, Atom. Vim mode is activated in my Terminal and even in the Browser.

Yes, yes, as it turned out, knowing the Vim commands you can very effectively switch between tabs, follow links, scroll down and up, search for text on a page and much, much more.

Under Chrome, there are as many as three extensions - the most popular Vimium , the less popular and slightly outdated Vrome and the booming, youngcVim. I started from the first, then switched to Vrome. The fact is that Vrome offers a funky feature - text editing in a third-party editor. That is, you go, for example, to StackOverflow to ask a question, go to the text box area and ... by pressing a key combination Vim opens - you can drive text using all its power. When saving, the text automatically gets back to the browser. Fantasy. Unfortunately, Vimium does not have such support yet. Although otherwise it is much superior to Vrome, I recently switched to Vimium recently and, as it turned out, many bugs were fixed, functionality was added, etc. Although without the support of an external editor, of course, you have to suffer. cVim - despite its youth, a rather powerful and rapidly developing project, I really want to hope that the author and participants of the project will not abandon,
I do not use Firefox very often, but as far as I know, Vimperator rules there .

Vim is a funky thing, the only drawback of Vim is that once you get used to it, you get used to it for life. For example, I now lack Vim mode in Skype, in Word, in Slack, etc. Interestingly, many websites implement basic vim navigation - gmail, trello, github, etc.

If you ever tried Vim and were able to get yourself used to it, you should definitely try again. If you want to understand Zen Vim, be patient. Launch and go through vimtutor , play with Vim Adventures . Try not to be nervous because all the time you have to remember / search for the desired key combination. Print cheat sheet. At first, it will seem to you that this whole sheepskin is not worth the effort and Vim in no way makes you more productive, but everything is exactly the opposite. Take my word for it, it will take months to experience all the charm of Vim. After some time, you won’t even think about it - your fingers will run around the keyboard themselves, and for an uninitiated observer your actions will look like sheer witchcraft. Someone even joked somehow - they say that any more or less significant Vim-ova combination will pass for Fatality in Mortal Kombat.

Well, are you intrigued? Now let's talk about the real editor (just kidding).

Since the first time I discovered Vim for myself, a lot of time has passed, but gradually the shortcomings of Vim began to reveal to me. The fact is that Vim is an editor. I can’t say that it’s impossible to make a full-fledged IDE, but damn difficult. And then, we are not only editing the text, we need full-fledged search and replacement, intellisense, a file manager, built-in support for VCS, preferably a terminal window, multilingualism and so on and so forth. Yes, Vim has a bunch of plug-ins, they can be connected, they can be tuned ad infinitum, and so on, but in essence Vim will, by and large, remain an editor. In this regard, Sublime is even no worse. I love the JetBrains IDE. Webstorm, for example, is just an awesome thing. What is wrong? And the fact that in both the Vim-mode support is not without complaints.

So, I want to have an environment that supports Vim mode, but at the same time:
  • with a more convenient built-in configuration language;
  • with a convenient plug-in manager and a sufficient variety of them;
  • with support for multiple languages ​​(input and localizations);
  • with convenient command navigation (ala Sublime).

And what do we have in the end? And we have Emacs. Yes, yes, do not be surprised.

I was prompted to study Emacs by idle curiosity, and also by a colleague who had been using Vim for ten years before Emacs, well, a friend from whom I dragged my configuration for Vim (and later for Emacs ).

At first, the evil Emacs didn’t let me in at all. I was joking at work, saying that Emacs has such a huge ego that it does not fit into my computer. To try, I downloaded naked Emacs, launched. I looked. Did not like. Then I tried to download the so-called Starter Kit - and I did not like it. Well, I can’t live without Vim mode, even crack. And then I discovered Evil-mode. And then I realized how all the same I was wrong in my laziness and I had to try Emacs earlier.

I just switched to Emacs and, perhaps, I will not give any advice. I can only say that I very quickly realized how flexible his environment was. Emacs is not an editor, it is rather a constructor from which you can assemble an IDE, a word processor, an organizer to your color and taste. For example: I thought, why not drive my Evernote notes directly into Emacs? I found the plugin, installed, configured - I use it. Wow. The second example: I have to write in English quite often and use a thesaurus. There turned out to be several plugins for this - I had to choose. The one that I selected displays a window with a list of variant words. But I need full automation; when opening a window with options, the cursor must jump into that window. And then, after I choose the appropriate option, could easily replace him with the search word and close the window already as unnecessary. It turned out that such tricks are very easy to program. And now I don’t have to surf the Internet for a thesaurus, and finding and selecting options takes literally seconds.

Concluding, I want to say that, of course, you can argue endlessly which editor is better. But still, I think - a real developer should master both. What I wish you. And only after mastering them you will understand. why do modern programmers need editors almost forty years ago.

Also popular now: