Why do I still prefer VIM for programming instead of other text editors ?
Dev Programming
Posted on August 10, 2022
Nevertheless, despite being a command line-based text editor, VIM is a prevalent text editor among developers. VIM is fast, lightweight, customizable, configurable & portable, and it is accessible on almost any OS and is more popular among Linux users. One of the most interesting things about VIM is that it keeps you in the terminal, which is perhaps the most obvious benefit it has over any GUI text editor, and you can even run & find VIM on any server machine preloaded. You can write code through SSH on a server machine. Vim is an efficient & effective text editor because it sticks to what its users want: a simple yet powerful way to input and manipulate text. Vim increases your productivity by requiring you to use the keyboard and allowing you to quickly complete repetitive tasks by letting you utilise existing keyboard shortcuts as well as customise and create the new ones.
The Installation process of VIM is very easy on any OS. There are no required prerequisites for Vim. It's a straightforward software package that includes all necessary dependencies.
ON MAC
brew install vim
ON LINUX
sudo apt-get install vim
I'm going to list the reasons for why I consistently choose VIM above other text editors and IDEs. If someone were to ask me Tell me one reason why you prefer using VIM over other text editors. I would say Memory & Efficiency because a lot of text editors are too heavy and slow to run on PCs or laptops with lesser hardware. There are several text editors for programming available, which is like a trap because new users sometimes install numerous text editors when they only require one. For every programming language, I see individuals installing specific editors, such as CLion for C programming, PyCharm for Python, and Sublime Text for web development.
Since this is obviously your machine and you have the freedom to use it anyway you like, I have no problem with it. Even if you have the most expensive PC or laptop, you don't need a lot of text editors for different programming languages.
LIGHTWEIGHT & CUSTOMIZABLE
I used a variety of text editors when I first started programming, but as I started to evaluate my work in light of the tasks I was given, I realised that I didn't really need specific text editors for certain programming languages. Now, I only use Sublime Text and VIM since the other text editors are cumbersome, slow to open, and cluttered. VIM is a command-line-based text editor, as you all know. Despite this, VIM may be referred to as a lightweight IDE because it can do all operations exactly like other powerful IDEs and text editors.
The amount of memory and processing power that Vim consumes on your machine is really low. VIM is the smallest and lightest text editor on the market. Even when editing projects with a lot of code, it is quick and lightweight and enables you to work on any system, on any server, it is simple to run VIM through SSH for remote operations. Additionally, it has immensely helpful key bindings that let you carry out any task you can think of while keeping your hands on the keyboard. However, once you get used to it, Vim is actually fairly straightforward to use.
When I was using Jetbrain's IDE for my programming task, my 8GB RAM PC kept freezing, and I had to restart my machine frequently. These are the main issues you may encounter if you use powerful IDEs or text editors. My PC behaves calmly when using VIM, allowing me to experiment with the writing function and generate output without even catching a peek of the freezing problem.
On VIM, customization is very simple and very adjustable. You may completely personalise VIM on your own by adding instructions to the .vimrc file, which is just a simple text file that VIM processes each time it is loaded and contains all the shortcuts and options to make your VIM more distinctive to you. The flexibility to tailor VIM to your specific typing requirements is what finally allows VIM to process text at the speed of thought. You may download any .vimrc file or design it yourself exactly as you want it to be. The .vimrc file's standard commands are as follows:
syntax on
set number
set noerrorbells
set autoindent
set noswapfile
VIM offers you a plethora of plugins, and you can install them depending on your usage. VIM configuration files are also portable, so you may use them on any machine and distribute your VIM configuration file to other people. A good editor, in my opinion, should flow naturally from your thought processes; if it doesn't, you definitely aren't using the appropriate one. Find the one that best suits your style by trying them all.
LESS POWER CONSUMPTION
The apparent response to this topic is that VIM's environment is lightweight. It uses less of your system's memory and resources and is the smallest and lightest text editor ever known. The question of power consumption on using a text editor depends on a lot of factors.
I use VIM on MBP M1 for 10–15 hours and If I talk about other text editors or IDE power consumption, I would say 7–9 hours. VIM lasts on Dell XPS 13 for 6–7 hours easily and other text editors & IDEs make my laptop hotter so that I can cook my 7–8 oz of Wagyu steak or some ham on it.
IT'S HARD BUT IT'S NOT THAT SCARY
Every new thing might appear more difficult at the first glance, but when you patiently learn it, it appears simple and enjoyable. Many individuals who don't use VIM are accustomed to using other text editors and believe that they do not need to convert to it since they are constrained by the new 'functionalities'. A new user of VIM could become weary of learning text editor features and desire to move to another text editor that allows them to easily navigate to their needs. VIM requires time and effort to learn and use on one's own, which is the apparent cause for getting weary of it or giving it up.
When I tried VIM for the first time, I quit using it after the first attempt. After reading many articles on VIM over the course of a week, I decided to give it another shot. The reason for this was a question on StackOverflow that had received over a million views asking how to exit from VIM, so it is reasonable that you might need some justification for believing that learning VIM is worthwhile. Then it dawns on me why VIM is one of the most popular text editors for programmers worldwide.
You might be interested to know what resource I used to learn VIM. Nothing but an Introduction & Some basic commands are the straightforward response to this question. I also discovered this book's Kindle edition to expand the information about VIM. I don't suggest you buy this book; it depends on you whether buying a book is worth it or why not try a free resource. I leave it to you to choose.
You may experiment with VIM for programming task since no one on the internet is pressuring you to give up your beloved IDE or Text Editor because nobody wants to go outside of their comfort zone.
IT'S FUN & IT GIVES YOU THE OPPORTUNITY TO LEARN SOMETHING NEW
I'm struck by how enthusiastic senior devs are to describe VIM's advantages every time you'll asked. Their eagerness is very understandable considering that while learning VIM for the first time, you simultaneously feel curious and excited. I'm aware that new users may find it difficult to be productive on VIM or may feel attacked or questioned by other text editor users. It's also possible that some of your college/university friends or coworkers may think you're hysterical for using VIM or that you are a top developer.
Once you have mastered the fundamentals of VIM, you may believe that you're prepared for this, but you still need to practise since VIM is not something that can be learnt by memorising a cheat sheet or tried once or twice. It's like learning something that can do whatever your five text editors can or cannot. When you started using VIM more frequently, you discovered you had experienced and arrived at your desired destination. The live project should then be used to test it. It's more crucial to practise VIM than it is to attempt it for the first time since nobody wants you to become really trapped with it. Because of this, I don't advise novice users to utilise VIM beyond their initial attempt.
CONCLUSION
Nowadays, everyone has a preferred text editor for programming, and each programming language has several text editors, some with more capabilities than the others, but they are all text editors that let users to create and edit plain text files or several programming language files. People are quite furious about software installation since they installed unnecessary software that uses up a lot of storage space. Certain text editors could be quite demanding on the system, resulting in abrupt freezing or departure, which can be very uncomfortable. This is why people should choose light and fast text editors for programming, which can boost their productivity. A programmer who spends most of their time on coding has a favourite text editor that they find utilising productive.
I choose VIM for my programming workflow and I choose it because it's fast, lightweight and highly customizable & configurable. VIM keeps me on the keyboard for every task which strengthens and increases my productivity as a developer, because using a mouse going to slow down. I sometimes hear the question, Why are you using such a difficult text editor for programming, from acquaintances who rarely use VIM. There are several factors, many of which I've already covered. Even if I don't use VIM, knowing how to use such a superb text editor is worthwhile since, whether or not you want to switch to VIM, learning how to use it is worthwhile since you'll undoubtedly become used to it and could even prefer it in the end.
Thank You for reading this article.
Posted on August 10, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.