March 08, 2016

I Ditched VS Code, and This is Better.

Programming

Published by Bhaswanth Chiruthanuru

Title

The story begins when I first started to code. At first, I know nothing about any fancy code editors, and the default Notepad was the only one for me. I used to write code using Notepad, and its actually worked for me at that time. But as the time goes, as I started to work on a little large code bases with multiple files, it became difficult for me to navigate through code, point out indentations and switching between files etc. So, I started to search for better options. But I didn't needed much time to find a better one, Notepad++.

At the time when I know nothing but default Notepad, Notepad++ was a Heaven's gift for me. (It was really long back when I was using Windows XP in a very old computer). It has everything for me syntax highlighting, indent guides and multi-file support (I didn't even have them when I was working in Notepad). I've continued to use it throughout my entire college days.

When I got into my first job, I tried to explore other editors too (Since I've used Notepad++ for too long and wanted to explore better options). I tried to explore other editors like Adobe Dreamweaver, Brackets, but I didn't feel that much attracted to them. IDE's like Intellij and Eclipse was good. But they took too much time to load and it feels like too heavy for me since I always want to have full control over my code from creating files to running the code. IDE's often lets us create projects and it handles code files internally. The search went on (still using Notepad++ though),until I find the right one, the one for me VS Code.

Honestly, if Notepad++ was Heaven's gift, then VS Code is Heaven itself. It have everything (this time, really everything) I could possibly imagine. So many beautiful themes, unlimited plugins, support for all languages, a large community etc. From that day onwards, VS Code became my everything, that I couldn't imagine working with any other editor.

Another five years gone like that. As time goes,VS Code became too heavy for me. I needed atleast a dozen plugins installed to work on anything. For themes, plugins, LSP's, all those looked like a mess in the editor. And it is too heavy to install in old systems and its sometimes crashing when I open multiple applications at a time. After too many issues like that, I finally decided to say goodbye to VS Code.

Or so, I thought. But its not as easy as before. I became far too dependent on my editor. I couldn't focus on coding without fancy theme, auto-completions and other utility plugins. Its like I couldn't realize how far I've addicted to it until I decided to switch from it. So, I decided to take it slow and first break down what I actually need and what I don't need in working. After thinking a lot, I thought these are the most basics I need to start working :

  1. Syntax Highlighting - Couldn't work without it now-a-days.
  2. Smart Indent & Auto pairs - Optional but good to have feature.
  3. Git - I like how VS Code provides nice UI to handle repositories (I know git commands, but I just like how it organizes things in UI).
  4. Live server - Will be really helpful when I am working on static web pages.

Now that I figure out what I actually needed, I searched for some lightweight editors to replace VS Code. Below are the editors I've tried :

1. Lite XL

One of the GUI editor I liked very much is Lite XL. It is written using C and we can configure and extend it however we want using Lua. This was an ideal editor for me. It has the basics to start coding and I can extend it however I want. It was all good, until I opened large code bases in the editor. When I open projects that has too many files like Laravel, the editor started to crash. At first I didn't understand whats happening, but after some digging, I found that Its not ready to handle large number of files. The best was to use it was in small code bases. So, I decided that it was up to the task and decided to move on.

2. Helix

After that, I tried editors like Zed and Sublime Text. It was also not good for me. I wanted the editor to be lightweight and fast. It was then I came across terminal editors like Vim, Neovim, Helix. At first it was difficult as I was too used to GUI editors, I couldn't easily switch to terminal editors. But I decided to give it a try, so I installed Helix in my personal system (Fedora Workstation 42). And honestly, I was surprised. Helix has everything configured and it was designed to handle large codebases too and it was blazingly fast. But there are some drawbacks too. Helix doesn't support external plugins (Not yet). We can configure Helix using .toml, but the amount of modifications we can do is limited.

3. Neovim

So, I decided to keep Helix and try the other one also, which is another popular editor Neovim. When I first install Neovim, I only saw a basic terminal editor. No syntax highlights, no plugins, nothing. It was difficult for me to understand how Neovim works. After researching more, I got to know the functionality of plugins and API's. Neovim is written on top of Vim editor and allows us to extend it using Lua.

First, I experimented a lot with Neovim by watching tutorials on youtube. Then I switched between distros like NvChad and LazyVim. After experimented enough, I decided to go with Neovim as by primary editor. Neovim has a large community of plugins and themes and it allows us to extend it however we want.

You can see the experimental configurations I've done for Neovim here : https://github.com/orgs/nvimworks/repositories

And for the conclusion, any code editor is just a text editor with some fancy features. In the end, we are the ones writing code. So my advice is to keep the dependency on editors as low as possible, so that you are ready to work on any environment at any time.

...

...

Login

You can login using youe email address to use the site effectively. The login will be temporary and will last only an hour.