DEV Community

Cover image for My Text Editor Journey: Towards Modal Editing
Shreyas A S
Shreyas A S

Posted on

My Text Editor Journey: Towards Modal Editing

Introduction

I jumped on the Linux bandwagon when my home PC couldn't handle Windows after the upgrade from version 7 to 10. Since then, I've been an avid Linux configuration nerd who likes playing with dotfiles. Dotfiles are basically hidden files through which we can configure programs in Linux. And you know what is required to edit a dotfile? A text editor, of course. Hence, I've tried a number of text editors in my Linux journey, which I am trying to recollect in this blog post.

An honourable mention to Nano

Even though Nano was the first terminal text editor I've tried, and maybe even the first editor I tried period, as I remember it, I haven't used it that much. Maybe when an online guide mentions it, I might have used it. But other than that, I've never intentionally typed nano filename into a terminal window, ever.

The good ol' gedit, my first love

My text editing journey started with customising bash shell by modifying the .bashrc file in the home directory using a text editor. At that time, my editor of choice was gedit (gnome text editor), because it was the one that was shipped with my Linux distribution of choice, Ubuntu. It was more than good enough for the job. There were line numbers. We can open it from the terminal by typing gedit, which felt really cool to me at the time. The only thing I didn't like about it was the lack of a good dark mode. Yes, I've been a dark mode lover since the early days.

Now I know that I could've installed a third-party theme like dracula and got a better colorscheme for gedit, but at that time I was new to the concept of configuring colorscheme as much as I was new to Linux.

LiteXL, the best gedit replacement

I've forgotten where I learned about it, but it felt to me like the sleekest, and simplest gui text editor I've ever used till then. It had a side bar with lots of goodies. Ability to open a folder and show up as a file tree on the left side. And, oh man, it's dark mode was spot on. It was also when I really dove deep into the colorscheme aspect of a text editor since there were a lot of nice-looking color schemes for LiteXL that provided different syntax highlighting styles.

I didn't know the word syntax highlighting then. That's something I'll learn a bit later. πŸ˜…

Micro, the better nano

It was this video from DistroTube that gave me an introduction to micro. At that point in my Linux journey, I was doing a lot of tasks like file manipulation and program installation from the terminal itself. Hence, a terminal text editor was something I loved to have. Micro is a terminal text editor, just like Nano or Vim, but unlike them, it has sane default keybindings like Ctrl+S to save and Ctrl+Z to undo. I even "contributed" to the GitHub documentation of Micro by correcting a typo that I noticed while reading through it.

I'm not going to link the PR in which I've corrected the typo because it was such a minuscule edit, but you are free to look it up on the GitHub PR page of micro. It's still there to remind me of my roots. 😁

Vim, the OG Modal Text Editor

When I started watching videos of DistroTube, Brodie Robertson, and ThePrimeagen, one thing I saw in common was that all of them were typing vim into the terminal when they wanted to edit a text file. Not nano, not micro; it's always vim. That was my first introduction to Vim. Then I heard a lot of good things about the modal nature of Vim, which included normal mode, insert mode, visual mode, etc., and it seemed cool. Then I've tried it, and the hype didn't really match, at least to the past me. I felt lost inside Vim, mostly because I didn't do my research beforehand; therefore, I didn't know my way around Vim modes. So I accepted my defeat and returned to my trusty, normal micro.

Another honourable mention before the final contender

The rival of Vim. An operating system packaged into a text editor. Bloated. These are the things I've heard about Emacs from multiple people online as well as from many YouTubers. I haven't used it because I think I am not its target audience. Emacs is tailored for people who would replace many of their daily-used programs, like their terminal emulator, text editor, note-taking app, PDF viewer, and image viewer, with another program that combines all of them into a single package. But I believe in the Unix philosophy, which to me is that

  "a program should do one thing,
   and one thing well"
Enter fullscreen mode Exit fullscreen mode

That's the reason I'm not using emacs. It does so many things, but I only wanted a text editor. πŸ₯²

Neovim, the epitome of perfection

It was the first time that I had to learn a new programming language (Lua) just to configure a text editor. I know that to fully customize VSCode, we need a bit of JSON knowledge. But who considers JSON to be a programming language, right? 😌 But oddly enough, I liked playing around with Lua. It was simple, yet powerful.

Not like Java, though. πŸ‘»

My introduction to neovim was from YouTuber Chris Titus Tech. He praised it a lot in his videos, and my curious mind made me try it even though I was living happily with my love of life, Micro. I've tried it and immediately went back to micro because it felt like I was forced to learn typing again, but in ways that made no sense. But there was this part of my mind that was saying, "Give it some time to cook, bro."

And I did give it some time when I tried it again after a while. I would say, using kickstart.nvim was one of the best choices I've ever taken. Hat's off to TJ for creating this wonderful piece of neovim config. It slowly eased me into the world of modal editing and, thereby, into neovim.

And then I never turned back. Yes, it was hard to learn vim-mode key bindings at first. But almost every new thing we learn is like that, right? It's hard at first, but then we think, "Why didn't we start this earlier?"

I've moved from kickstart to neovim-for-newbs by TypeCraft, and then settling with a config I've based off of Neovim from Scratch by chrisatmachine. I've added the plugins I use, made changes to my liking, and converted it to an IDE for my coding. I even created a colorscheme (which I named neodarker) by modifying an existing one, to match my taste.

If you'd like to check out my neovim config, head over to my dotfiles repo on Github where you can find it inside .config/nvim directory.

What's next?

To be honest, I don't really know. πŸ€” Since I am very satisfied with my Neovim setup, which I am using as an IDE for my programming needs as well, I don't feel the need to jump to some other editor. But if I ever feel like experimenting, I do have some that I've been looking into, like

  1. Helix
  2. Zed
  3. Cursor

Conclusion

I've tried a bunch of text editors like nano, gedit, micro, neovim, etc. during my Linux life. I've learned what makes a text editor good, and more importantly, I've understood what I need out of a text editor to do the things that I do. It was a wonderful and long journey, and I don't think it'll ever end. But that's fine. Because it's the journey that matters, not the destination.πŸ€


Hi all! πŸ‘‹ How was your text editor journey? Are you using modal editing (vim mode) or non-modal editing? Which is your current text/code editor? Comment down below, because I would love to know.

Also, this is my first blog post (in my life) hence I would love to know what you think about my writing. Any and all kinds of suggestions are appreciated. πŸ₯°

Top comments (0)