Raveen Kumar

Vim VS Emacs! Colemak VS QWERTY! Dear God!

Did I ever tell you the definition of insanity? - Vaas, Far Cry 3

The age-old question. Which is the best text editor?

I sought that out myself. I started as a vim user from around 2018 due to my job. In 2019, I got super deep into vim’s core features and as I discovered more, my programming and editing speed improved. In 2020, due to corona, I was working from home and decided to get into learning more about, and I got into vim scripting. And came to the conclusion that vim script is total garbage. No one in their right mind would use it. I really wanted to do more things, and I was getting blocked because I was unable to extend it.

So, I decided to switch over to Emacs. The only other extensible editor. Man, this was a wild journey. I got introduced to so many new concepts when I explored Emacs. It was so fucking amazing. I never knew of the lisp programming language before configuring Emacs with elisp, and it was an eye-opening experience. Everything was so simple and easy. I really wish modern programming languages will adopt useful things from lisp.

At this time, just before switching over to Emacs I was exploring on increasing my typing speed and I would like to learn how to touch type. I got sick of looking at my keyboard every time I typed, and the hunt and peck method was taking its toll on my eyes. I tried to improve my speed by learning touch typing on QWERTY, but it never worked out. My muscle memory took over, and I always forget to apply what I learnt. I thought it was a good idea to learn a different keyboard layout. I searched and tried Dvorak, workman and finally settled into Colemak. The third most used keyboard layout after QWERTY and Dvorak.

The plan was simple, 5 mins a day, every day. I did it, but it took 6 MONTHS. Yes, that’s how long it took. It was very difficult for my old brain. For kids, this will take about 1-2 months max. But most kids can learn in 15 days, on average.

This is my https://keybr.com profile, and these are my statistics. (I did not test my speed and accuracy in a long time, and pretty sure it’s much better than this.)

Colemak Statistics

As I completed it, I was amazed by what I was able to accomplish. For most humans, in this modern age, muscle memory of typing is one of the most difficult things to change. But I did it. I got a massive sense of accomplishment. However, there was a huge problem that I did not anticipate. I was unable to use vim’s HJKL keys. This was a huge blow to my workflow. HJKL is used everywhere in the Unix world. ranger terminal file manager uses HJKL too.

Now, I took this as an advantage because already I am going to use Emacs anyway, and I didn’t need HJKL any more, so I ignored it for a while. As I got into Emacs, I went deep into elisp programming. It was new and exiting, I was able to extend my editor as much as I wanted, and it took my workflow to the next level. Since I am not using vim, I also have to discard using tmux too. Emacs had better window management and plenty of goodies that help me better than vim and tmux ever did.

I kept using Emacs + Colemak and my productivity improved significantly. Emacs also helped me write my first website with org more and org-mode to HTML publish mechanism. It was super useful. But, there is a big but, of course. It crashed. Crashed a lot. No matter what I did, it crashed on remote servers. Then my config files got so huge that I had to rewrite multiple times. Emacs also got slower and slower with each plugin I added. But vim was superfast, no matter how many plugins I added to it.

Finally, after 1 year of struggling with Emacs, I completely deleted and removed all the configs from my dot files repos and took what I learnt from this experience and went back to vim. Now I am back to vim and tmux combo and added some features that I liked from Emacs.

(This is my last Emacs config before I deleted it.)

My favourite things in Emacs are,

  • Kill ring
  • use-package
  • e shell
  • dired
  • winner-mode
  • compile-mode
  • Emacs psycho therapist
  • magit
  • org-mode
  • outline-mode
  • which-key
  • projectile
  • yasnippet
  • ivy, counsel, marginalia
  • add-hook, hook concept
  • (+ 1 2 3) is not '(+ 1 2 3)
  • (Walled garden)
  • The definition of buffer makes infinitely makes more sense than in vim
  • ()
  • Parenthesis are beautiful. I repeat, it’s beautiful. Once you get used to it, your brain tunes it out and makes more sense than white space.

The funny thing is that Emacs key bindings can be used system-wide in macOS. Once I realized it, my life was so much better in macOS now.

My setup is a total Frankenstein monster now, it’s totally insane.

  • vim + tmux for programming
  • Colemak for typing
  • but I can’t use hjkl as a vim user
  • using Emacs bindings everywhere else
  • I use arrow keys
  • dafuq is this shit

It is amazing how my mind adapted all these concepts. If I like, I can still type in QWERTY by looking at the keyboard. Until now, I typed in Colemak. Now I am typing in QWERTY at almost the same speed as Colemak but with a bit more typing errors.

This is what I learnt from this whole experience.

  • Basic text editing is more than enough.
  • If you want to type and edit faster, find ways not to write code.
  • Elevate your programming skills to the point where you don’t need to code, find ways to avoid it
  • By doing this, you will realize that, you don’t need to write a lot of code to solve a problem that does not exist in the first place. You don’t need to write code for every single problem.

from Imgflip Meme Generator

Whatever tickles your pickle bro.

But wait.

Did I ever tell you the definition of insanity? - Vaas, Far Cry 3

#Tech