Back to home
October 26, 2024

Neovim; A Keyboard-only Editor

Neovim; A Keyboard-only Editor

I started my programming journey when I was in eighth grade. At that time, I was very immature about thinking in a programming way. I used to search on Google, "Is Django better than Rails?", "is Ruby better than Python?", "What can I do with C++?" I like this kind of stuff! Also, I was confused about the text editor for programming. I remember I used Atom (Github's Cross Platform Editor) for my Python code. I also used Codeblocks for C++. Even I was using VS Code like couple of years ago. But I realized programming is something in which you need to be very efficient and active. I always feel the mouse is not very efficient while programming. You need to use it to navigate through files, etc etc. I know there are shortcuts for editors like VS Code, JetBrains IDEs, Sublime, etc, but I feel keyboard keyboard-only editor is best because it's very fast & efficient while writing tons of buggy programs. 

Things changed and I started to understand the term "SMART Criteria". I just started realizing the concept, "solution frameworks need to be appropriate for the problems". For example, I built an invoicing system in Laravel. Why Laravel? Because it has robust features regarding PDF generating, designing, etc! Yeah, I could have done the project on NodeJS or Rails but the packages for PDF, scheduled tasks, analysis, etc. were more robust than these frameworks. And PHP is cheap to host also. From all circumstances, PHP was the best pick at that time. On the other hand, I am currently working on a project that consists of the features of scrapping, analysis, generating data files, rich mathematical terms, etc. I picked Django for this project because it was efficient to integrate Pandas, Scrapy, etc. with Django.

That's where I found Vim. It is a highly configurable text editor built to make creating and changing any kind of text very efficient. I started using it. At first time, I felt very uncomfortable using it. When I understood how shortcuts worked and the mechanism behind Vim, I became a fan of it. It takes only :w to write a buffer! Can you believe it? A lot of things are there in Vim which is very efficient like h, j, k, l for navigating through codes, r for replace mode, i for inserting from the point of the cursor, u for undoing the last work, etc. Isn't it cool? I guess so :)

In this modern era, Vim can throw some troubles at you like not having much extensibility, debugging, support for your preferred frameworks, etc. That's where Neovim fits in. It is a text editor that's based on Vim but with added features and improvements. It's designed to be extensible and usable and is well-suited for terminal-based text editing. Neovim uses Lua as it's scripting language and when you start using nvim, you will go through lots of Lua code to configure it. Don't worry, Lua is very simple. If you know basic programming concepts, it will take about an hour to figure out Lua syntax. 

Neovim (nvim)

I am not going to tell you about this because you can find it on its official website. I will only say if you get handy with it, believe me, you will write code more efficiently than you did before. If you want to start from scratch, Kickstart is the best point to start.

Here's the Kickstart Github link: https://github.com/nvim-lua/kickstart.nvim

Just go through the docs, and understand what the doc is saying. That will be enough I guess. To use nvim, you must know it's shortcuts, right? just go through this cheat sheet. Believe me, this is the best cheat sheet of nvim I have ever come across. 

Here's the link: https://docs.google.com/spreadsheets/d/15k_UgeY0C3j8tVQnR2hD_kNljB1AApG3x3gYrKtUAlw

If you are still confused about it, just go for this YouTube video by Henry Misc. He did a great job. This video is really good for beginners.

Here's the link: https://youtu.be/KYDG3AHgYEs?si=FVr9gciVCkOTbCfg