In pursuit of the perfect IDE

Mehrad Mahmoudian published on
6 min, 1351 words

Categories: Emacs

Abstract

I used to always look out for a "good", or dare to say "perfect" IDE. It was some sort of a passion/hobby that rooted in an actual need for some editor that feels like an extension of my mind/body and yet out of the way that I can focus on being creative while writing code or blog post.

Pretext / History

The first IDE that really felt like home was Komodor where I did a lot of PHP and later Perl between 2005 to 2009. After moving to Linux, nothing was that comfortable until I found RStudio. It was great, but was not very customizable. For about 10 years I have tried many others including Atom, Kate, [neo]vim, code-oss, zed, micro, helix, Rkward, Pragtical, ... and the quest was still on. Every few months something new was trendy and I was rushing to try it out and see if I can find the one true IDE.

Some 5 years ago and after a major frustration while configuring my Neovim in Lua (which was initially ported from my vimscript vim config, I went online and saw a video from DistroTube about Doom Emacs. I always was running away from Emacs for few reasons:

  • It uses unconventional keybindings out of the box
  • The config is in a unfamiliar language
  • It is ugly out of the box
  • It doesn't use ~/.config freedesktop convention for config files
  • It is a GNU project, and one thing interacting with Gnome and GTK community taught me was that they are rude, egocentric, and extremely unwelcoming.

Doom Emacs felt like a good compromise:

  • It is beautiful out of the box
  • Uses familiar keybindings
  • Has a healthy and helpful community

After using it for about 4 months, I realized I have changed the config so much (and perhaps so wrongly) that every update breaks something.

To escape this situation, I started looking for online tutorials to start my own config. I found lxsameer videos online and spent some days understanding elisp and Emacs better, but it was not as easy as it looked. I also tried to go through the Emacs tutorial (C-x h t), but it was ugly, boring, verbose, and took too long. To this day, I have never got to the end of the tutorial.

A friend of mine who is a long time Emacs user saw my suffering and offered to help me if I want to learn Emacs and have my own config. He literally sat besides me in front of the computer, and for several hours across several sessions and explained to me some details. It was a true revelation. He explained some fundamental parts of Emacs that during the several months of me reading blogs and watching videos, I had never truly understood them. From minor things like variable scopes in elisp (lexical and dynamic bindings), to how the faces are defined and how to modify them interactively.

Sudden realization

During the past few weeks, I have seen some posts about new IDEs or new features in some well-established IDEs, but I have noticed one "new" feeling: I ... don't ... care! I haven't opened the YouTube video about that new shiny app, nor I haven't clicked on the article which was promoting the nice new feature. I consciously and subconsciously simply don't care anymore! This is a very new feeling!

I believe the main reason, if not the only reason, is that I now have Emacs and I'm very comfortable with it. There is nothing [so far] that I need and the Emacs ecosystem doesn't deliver/provide.

It is not that I don't care about what tools are available, but rather I already have them (or can have them fairly easily) in my Emacs setup. So I can sit back, relax, and don't get FOMO for the new shiny tool or feature. Some can anticipate that the FOMO have transferred from trying independent softwares to trying different Emacs packages, but no, I haven't add a new package to my Emacs config for months now. I'm also fairly confident that when that day comes, it is not a big deal and will not hurt my Emacs config or setup. It will be a small new section in my config for that new thing.

Don't get me wrong, Emacs is not easy to get used to, has a relatively steep learning curve, and for the most part, in my opinion, has extremely cryptic starting points. But getting passed all that (with the help of friends, the community, and perhaps genAI these days to make sense of some of the elisp codes), everything goes smoothly and will have a stable config that can serve you for years to come.

Current state of affairs

At the time of writing this, I've been using Emacs for about 5 years, and I have had my own Emacs config for over 4 years now.

I do all the following in Emacs (E for Exclusive, M for Mostly, and P for Partial):

  • Programming & git (M)
  • Writing blog post (E)
  • Note taking (E)
  • TODO lists and agenda management (E)
  • File management (M)
  • playing music (M)
  • IRC (E)
  • Reading documentation, manpages, and info-pages (E)
  • Mastodon (P)

Before using Emacs, I was using the following for the same tasks:

  • Programming: Neovim or RStudio
  • Writing blog posts: Neovim or Kate
  • Note taking: Joplin
  • TODO list and agenda: Joplin + Google Calendar
  • File management: vifm
  • Playing music: cmus or moc in terminal, or Elisa or Amarok for GUI
  • IRC: kiwiIRC web interface
  • Reading manpages: terminal + bat for coloring it
  • Mastodon: web interface

The best two things about using the same ecosystem for "everything" are:

  1. same keybinding across the board and no need to re-learn anything
  2. various programs can integrate with each other (e.g., the git application can naively interact with file manager and the text editor in the same window)

Emacs has become one of the pillars of my digital life, and luckily, such an integral part of my life is also FLOSS (Free and Libre OpenSource Software), which means in worst-case scenario that they stop developing Emacs, I will not lose the right to use it and improve it myself.

Final remarks

I do acknowledge that Emacs is not the silver-bullet and will solve all the problems and will provide for every need of a programmer. But what I can confidently say is that Emacs is so malleable that one can potentially make it to do whatever they want to.

For me, this is new feeling that I never noticed before. The fact that a new fork of some popular editor comes out with some new features or stripped out AI and I don't have the urge to install it on my machine is a very new thing for me.

This short blog post is not supposed to convince you to use Emacs, it is supposed to encourage you to try out new things, so that at some point you can find something that fits the bill for you. But if you ever were curious to checkout my config, you can find it in this link:

https://codeberg.org/mehrad/.emacs.d

You can also checkout my very minimal Neovim config. It is might be out of date and in need of some maintenance, but being a minimal config with less than 200 lines of Lua, it might have survived the test of time:

https://codeberg.org/mehrad/neovim-config