There are tons of text editors out there, and every single developer has its own preference: Sublime Text, TextMate, Notepad++, GEdit, Emacs… same thing happens with IDEs, such as Eclipse, IntelliJ, XCode, RubyMine, Android Studio, Visual Studio… every single one has its own pros and cons; however, if there’s a text editor that is the preference of the so-called “hardcore programmers”, that is Vim.
Vim is a free and open source text editor based on Vi; you will probably have it installed on your computer, so go ahead, open your terminal and type
vim test.txt; your terminal will turn into a full and rich text editor, which is awesome. There are great tutorials out there to learn how Vim works (if I have to choose one, this interactive tutorial is my favorite) that will show you how to get the best form Vim.
While I’ve used Vim in the past for minor things (squash my git commits, do a simple edition on a file…), it has been this last month when I’ve started to use Vim intensively: every single day I have to work on a remote instance of a Debian machine that contains a Rails application. In the past, when I had to work with Rails, I used Sublime Text or RubyMine, but never Vim before, and I was very happy with results.
Vim is totally customizable, and you can add as many plugins and fancy stuff as you can imagine, which converts Vim into a great development tool (as you can see in the following video):
However, Vim is not “my tool”. Maybe I’m used to “the graphical” text editors, maybe I don’t want to learn a whole new set of shortcuts (yeah, when I press
Cmd + F I want to do a search, and want I type something I want to write something… yeah, I’m looking at you, “INSERT MODE”) or maybe, I’m just human and variety is just the spice of life, and I am that kind of developer who doesn’t like to use Vim for everything.
Just to illustrate how “hard” is to me to get used to Vim, I have found this little joke to be very appropiate:
How do you generate a random string? Put a first year CS student in front of Vim and ask him to save and exit.
The only thing that I can do is to learn as many Vim features as I can, but looks like I will continue using my mouse, using the arrow keys… and using any other text editor or IDE when I can ;)