Why Programmers love the vim editor

Bhavyansh @ DiversePixel
3 min readJun 4, 2024

--

Let me try to deliver this love to you as well in this crisp blog post.

  1. Creating a file named dev_tools

2. In it, writing some text (press i to go in the insert mode, esc to come out of it)

First cool thing: Search using vim, using the extended mode (:) you can search in vim as shown in the image below:

Second cool thing: Replace. After you’ve made the search, it is very simple to replace one, or all the occurrences in this file using very simple command, as shown in the images below:

Third cool thing: Copy and paste. Go at the starting of page using gg, go at the end using Shift+g, move around to go to the place you want to copy from.

To copy, type (in command mode, out of the insert mode): 4yy to copy 4 lines. Now to ‘yank’ them anywhere, you only need to press p after placing your cursor there.

Which other text editor yanks lines? Except Vim!

Whitespaces? Vim got you covered!

Imagine how handy it can get creating Dockerfiles and yaml files where we as engineers copy and paste the working code from official documentation. All it takes in vim is just a line of command.

Imagine all this, and more, without having to lift your hand off the keyboard.

Vim indeed is amazing!👌

If it still doesn’t feel quite perfect, you’re built different, linux has something for you as well, you can try out pluma.

--

--

Bhavyansh @ DiversePixel
Bhavyansh @ DiversePixel

Written by Bhavyansh @ DiversePixel

Hey I write about Tech. Join me as I share my tech learnings and insights. 🚀

No responses yet