First of all, let’s make things clear. VIM does not stand for Very Intuitive Magic. It’s not easy to learn and it’s like going to the gym. You have to be consistent and use it daily to see the results and keep in shape once you are fit.

But why is it so confusing for most of the people? It is a modal editor, and every mode has its own key bindings. By default VIM opens in «normal mode», which won’t allow you to type. You have to get into «insert mode» pressing the «i» key to be able to insert text, but you could also place the cursor on a character and press «r» to replace it with whatever you typed next, or you could press «o» to create a new line and enter «insert mode» at the same time, etc. You have to remember what every key does in every mode, and you’ll only achieve this with practice. That’s what makes VIM different.

Why bother?

So why would anyone try to break the learning wall and master VIM? Some will say it’s just to prettend you are cool, but they couldn’t be more wrong. There are some features that make the VIM user objectively faster than any other editor user.

No mouse

The first one is the fact that you don’t have to use the mouse for anything. Think about how many times you use the mouse to move around a document in any other editor and sum all those precious miliseconds. It’s a lot at the end of the year.

Changing an “IF” condition and adding an “IF” in 10 seconds

Hands always in standard position

It’s not only that you don’t use the mouse, but you actually don’t have to move your hands out of the standard position, meaning that you don’t need to use arrow keys, or other keys outside the normal reach.

Preinstalled

It comes preinstalled in almost every decent operative system, so you don’t have to go through the hassle of downloading it every time you change your computer or want to edit something somewhere else.

Runs in Console/Terminal

It runs GUIless, in a Terminal or Console, so if you are working on a development project running servers, scripts and commands, you don’t have to switch context. You can feel at home even when editing files in remote servers. This means you can even access and use VIM from a smartphone with an SSH app.

Editing the itnig website in a Mac, with and iPad, through SSH

Lightweight and fast

It’s lightweight and fast, super responsive and never crashes. It takes 60ms for it to open a file containing the 131843 lines of the Holly Bible.

100% Customizable

If there is something you don’t like just change it. The .vimrc config file lets you customize the behaviour of your editor and confortably replicate your settings between setups. If there is something missing, just install it as a plugin.

Macros and scripts

You can actually record your commands to automatise repetitive tasks. Imagine you have a data file you want to make JSON compliant. By recording what you want just once, you can replicate it as many times as you need.

Making a data set JSON compliant by recording and playing a macro

And if that’s not enough for you, you can write scripts using VIM Script and customize your VIM even more.

How fast can you type all IP’s in a local network in your editor?

With just a few lines you can for example create your custom syntax highlighting toggle, and use a shortcut to activate it.

VIM syntax toggling script https://www.ibm.com/developerworks/library/l-vim-script-1/

Breaking the wall

The best way for learning VIM is using it for everything. From writing documetation to typing code in every project you have. Start with the basic commands: i, :wq, dd, p, hjkl.

You can try this awesome Zelda-like game to learn how to use VIM.

Keep using it, because you’ll never feel you know it enough.

I hope this gave you the essentials to start exploring the eternal possibilities of VIM. Feel free to comment below if you have experience using it yourself, the more tips the better. When you master VIM, I can guarantee that you’ll never use any other editor again. Enjoy!

 

Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *

S.

Startup ecosystem ranking and technology under the hood

This is the Newsletter shared on the 3rd of May. If you wish to receive newsletter faster, you can subscribe here: https://itnig.net/

 

Dear tech entrepreneur,
Ready for your quick dose of startup and tech news? Here we go!

The European startup ecosystem is fastly evolving and catching up. Don’t trust us, trust the ranking made by StartupBlink in collaboration with Crunchbase and others that lists 1,000 startup ecosystems from 100 different countries (if you are curious, Barcelona ranks 27 and Madrid 31). On top that, some people suggest Silicon Valley should look to Europe to solve its IPO problem.

On another note, something that caught our eyes was the return of Foursquare to big funding rounds. The location check-in company has raised a $150M Series G round. This is more than four times larger than its previous round showing that a business can retake traction after pivoting.

And last but not least, don’t miss the chance to attend an event organised this Wednesday at OneCoWork where Factorial’s founders Jordi Romero and Bernat Farrero will be talking about the new schedule control system.

– itnig’s team

Podcast #91: Making a very successful B2B printing company – Technology under the hood
In this week’s episode, Andrés Askenasy (Industrial Director @Camaloon), Maite Forcadell (Printing Manager @Camaloon) and Juan Rodríguez (CEO @Camaloon) chat about how Camaloon uses technology to make a very successful B2B printing company.

Andrés and Maite emphasise on what makes them different. Camaloon is run out of optimization technologies that enable them to save costs and time for their customers while remaining a successful business model.

Their next challenge? Controlling the end-to-end process including shipping. What an exciting time for them!

View on YouTube | Listen on Spotify | Listen on Apple | Listen on Google | Listen on iVoox.
And also in AnchorBreakerCastboxOvercast, and Stitcher.

New funding for startups 

Random tech news 

Product of the week 💛
Ferrari doesn’t want to get behind other players in the industry in the race (pun intended) to build greener supercars. The Cavallino Rampante has now turned hybrid with their new Ferrari SF90 Stradale getting an impressive 986HP and a top speed of 340km/h.

Work with us 

Plain Old Good DveloperSomeone who can abstract problems and find solutions across the whole stack. 

Find out about more vacancies at itnig.net/jobs.