What's your favorite editor?

What’s your favorite terminal editor? Vim, Emacs, Micro? How did you get started using it? Why do you like it?

I started using Micro after I installed Garuda for the first time since it is the default editor. I liked it right off the bat because it was so easy to get started–it’s got the same keybindings as a lot of other applications like word processors or web browsers. As time goes on and I learn more about the advanced features it has I like it more and more. It’s so customizable! Pretty much any feature you want can be assigned to any keybinding you want, for example.

I have tried other editors too though, and invested a good deal of time into studying and practicing Vim because it was supposed to be so fast and efficent. Not to go into a long-winded Vim rant or anything, but…oh, what the heck, here’s a long-winded Vim rant:

Vim’s broken promise

I started studying Vim for probably the same reasons as most folks: reading fervent accounts from Vim enthusiasts about how once you learn it, it is so fast and efficient, and you just get into this zen-like workflow where your keystrokes are like movements in a dance, and blah blah blah. Plus, sometimes you’ll read something like this, where the guy is clearly a full-on Vim ninja. I gotta admit, it’s just really impressive for some reason.

Just to clarify before I get into it, I do not think Vim is a bad editor. It’s not terribly difficult to learn if you go through the tutorials and spend time practicing with it, and it has a lot of good features. Still, it doesn’t necessarily seem faster or more efficient than basically any other editor out there for most things, and for a lot of basic things it’s actually terribly unweildy for no reason except that is the way it has always been.

A good example of this is how Vim uses H J K L as the arrow keys. This configuration is kind of Vim’s claim to fame, or at least one of the features that is more well-known to non-Vim folks. Vim enthusiasts will proudly announce this is a great workflow boon because all your arrow key work is right there on the home row instead of…well, on the arrow keys I guess.

But is that such a tremendous benefit? I think the majority of arrow key users would agree that the arrow keys are very easily accessible. Most people probably do not have to look at the keyboard to find them. You just shift your hand over and hit the keys when you need them, same as you would for any other keys that not in the main typing area. I would argue the arrow keys are more accessible than the navigation keys (Home, PgUp, PgDn, etc), the num pad, or the F-keys.

Then, once I started practicing Vim I realized this home row thing was a bunch of bologna because you have to constantly hit the Esc key for changing modes when you are using Vim. That’s just as far away as the arrow keys on most keyboards, so it’s not like we aren’t moving our hands around here.

Where did this H J K L nonsense come from, anyway? Well, turns out it was not some efficiency hack or anything like that. Rather, the author of vi wrote the program on a ADM-3A terminal.

The ADM-3A terminal has the arrow keys on hjkl:

By the way, on these old ADM-3A terminals Esc was positioned where Tab would be on a modern keyboard:

Esc used to make sense as a key for changing modes, which you need to do constantly when you are using Vim.

H J K L is just an old, clunky way of interacting with the arrow keys that has been carried forward not because it is efficient or practical, but because people have gotten used to it.

I think the straw that broke the camel’s back for me was just what a pain in the neck it is to exit out of Vim. I don’t mean the old “I’ve been using Vim for ten years…because I can’t figure out how to exit the file” joke, I mean the options for quitting out of Vim are just so clumsy and unnecessarily long-winded.

Take for example the simple case of opening a few files to see what is inside, maybe copy a line out or make a quick edit, then close the files down. With the Micro editor, you hit Ctrl+Q and the file closes. This is one keystroke. It can be done with one hand. If the file has been changed it will ask you to save, y or n so you will press one more key at the end of the normal binding. Nano is basically the same with a different key.

If I want to exit out of a file with Vim, first of all I may need to hit Esc once or twice depending on what mode I am in. Then, to quit you need to press Shift+:, q, Enter. That’s three keystrokes, plus we need both hands now just to exit out of the file.

But wait, there’s more: if you modified the file at all (even accidentally), the exit command will just fail. Now you need to start over. If you want to exit and discard the changes, you need to change the key sequence: Shift+:, q, Shift+!, Enter. Now we are up to four keystrokes, and quite a back-and-forth on the keyboard as well. If you want to exit and keep the changes you made, you’ll have to use a third key sequence: Shift+:, w, q, Enter.

Maybe it’s just me, but after doing this repeatedly while looking through files it quickly started to feel really tedious and inefficient.

Where is the speed, the efficiency, the zen-like flow I was promised? Putting in my PIN at the ATM is faster than closing out of a file with Vim.

Practice anything long enough…

For many years when I was younger I worked in a supermarket where the cashiers would have to type in a four-digit code for every produce item (carrots, lettuce, pototoes, whatever). There was a code book where they could check what a code was if they didn’t know it, but the experienced cashiers would eventually have all but the most unusual items committed to memory.

Watching some of them work was quite remarkable; their fingers would be flying over the keypad at breakneck speed, while they calmly passed some broccoli or whatever over to the bagging area with their other hand, never looking at the numbers the whole time. It just became muscle memory after a while; they wouldn’t even think about it conciously while they were ringing up the produce.

Their speed and efficiency was not due to the produce codes being logical, easy to type in, or otherwise conducive to an effective workflow. It was due to typing them in over and over all day long. The codes could have been anything at all and eventually, through repetition, they would have learned them and gotten quick and efficient at typing them in.

In this way, I think people certainly can be fast and proficient with their Vim usage after they have practiced long enough. I do not, however, believe this has much to do with Vim itself, but is more the byproduct of extended exposure to a routine. People can get fast and efficient with any editor with enough practice.

Why I think Micro is better

Micro uses common keybindings that everyone already knows from other programs like word processors or web browsers. Ctrl+C to copy, Ctrl+X to cut, Ctrl+V to paste, Ctrl+S to save, and so on. This is a nice feature because you can get started without any studying or practicing required.

Being able to actually use the mouse if you want to is a nice touch as well. You don’t need to use the mouse to get around in Micro, but if you want to you can drag to create a selection, double-click to select by word, or triple-click to select by line. It’s nice to have the option.

Micro has tons of other awesome features too, like multi cursor support, split or tabbed windows, and a fairly robust plugin system. For those interested, I have discussed the advanced features of Micro in more detail in the FAQ/tutorial topic here: Mastering the Micro text editor

My favorite thing about Micro is how customizable it is. You can rebind keybindings or create new ones, or edit the settings of the editor itself on the fly if you’d like. Go ahead a write your own plugin if you have Lua chops, it’s all supported.

What editor do you like?

What’s your favorite editor? Micro? Nano? Vim?

By the way, I hope I have not caused any offense to the Vim community with my long-winded rant; I think each person should use whatever editor they enjoy!

If you are a Vim user, have you tried the very excellent Helix?

6 Likes

Nano. Because if I add another ‘o’ it reminds me of Mork & Mindy.

I hate vi/vim. It reminds me too much of ed/edlin.

5 Likes

I love Nano
It does what i need it to do :smiley:

4 Likes

MICRO, the one and only :smiley:

And Kate and Geany (Gedit)
3 Likes

Most of the times I use micro, occasionally helix (a better take at modal editing than vim imho), I like emacs but did not use it in a year (I end up spending more time on it than the file I’m editing), vscodium when I need to make sense of some largish source code.

3 Likes

Micro for when I’m in the terminal. I like its more standardized keybindings and the mouse support is a good addition.
Kate for when I’m not in the terminal.

2 Likes

Since transitioning to Linux back in July, I’ve tried to get in the habit of using Nano and do use it sometimes. But I keep falling back to the VSCode (VSCodium nowadays) that I’ve used for years.

1 Like

Like everything in life, you first take what you know and can handle and then try out the new one.
I didn’t like scampi until I tried them. :smiley:

3 Likes

I like neovim , not because I am nerd , No!!!
I am extremely noob thing
But because I now know how to customize it and feel like I am at home .
The things which makes me to use nvim :

  1. I have a fuzzy finder to quickly switch to the file I want to :
  2. I have LSP support which helps me sometimes when I have mistakenly didn’t noticed any error :
    Screenshots | Garuda Linux preferred :master: - #1343 by Ankur
  3. I can decide which color scheme I want and how would it look , and I love how it looks :
  4. I can have a git integration in my editor :

    I can’t say whether others would like it or not but I like it very much :smile:
  5. I also have undo tree through which I can keep track on any code if I want and , through it I can jump back to code on previous version which was written some days ago :slightly_smiling_face:

    I don’t use it this time as I am mostly busy with other stuffs which are more important for me than coding , you know :wink:
  6. I can even add more features in future in it whenever I want :slightly_smiling_face: , like a co-pilot :grin:

I don’t have any big reason to use neovim but I think I have got use to of it so I won’t leave it either for something like vscode or vscodium :slightly_smiling_face:

EDIT : my neovim config is currently in a private repo , I can’t share it for some personal reason :sweat_smile: , but there are plenty of resouces to learn how to customize your editor :wink:

5 Likes

I partly agree with you on vim. It is not very nice to use ootb. That’s why it’s gotta be configured. I am using lunarvim (neovim + treesitter + lsp + telescope + auto suggestions + theme and a bunch of sane defaults). There isn’t a lot I have changed out of box in this but remapped jj to esc from insert mode, made a keybinding to search for a string in files open in the current buffer and basically set indent to 8. This is where the rapid flow comes from.

I can easily go jj space+e to explore files and open them in either a new buffer or separate window. space+bn/b to change buffer, space+bl/k/j/h to close them, use space+G to search for a particular string in these opened files, space+f to search for a file in entire file system or current directory. space+w to save and space+q to quit.

The essence of work flow develops from what you consider an easier action to perform. Plus habits. I like to use vim keybindings in my hyprland setup to move around windows and also in browser using vimium C. It’s just something that’s almost natural to me now. Not having to reach out for a mouse just feels a lot less clunky to me.

4 Likes

The same keybindings with the same functions that I prefer :grin:

I actually took lunar vim as inspiration but I liked to configure my own neovim setup

doesn’t that thing gets covered under LSP ? because it is the one through which I get suggestions … :slightly_smiling_face: ?

Yeah you are right. That was my mistake.

1 Like

Having tried tons of editors, for coding VS Code yes i know may be looked at as a editor for novices but i really dont care,its intutive and user friendly, been coding for a little north of half a decade but the extension support is unmatched in vscode, it just does what i need it do without me having to spend months learning keybinds.

For configs, nano as its also more intutive compared to others like vim.

I’m happily married to Kate :cupid:

Micro for editing in a terminal and VSCode for all other purposes. As pointed out, extension support is great and I generally love the overall handling. Have used Pycharm for Python but quickly found myself returning to VSCode… :joy:

@BluishHumility your micro guide really showed me a lot of things I was missing out until now!

2 Likes

Move it to Wiki or FAQ or Tut or …

That’s where it is! :smiley:

2 Likes

With neovim, it only makes sense to use one with several modifications and plugins.

One such example is LunarVim. Since I am not an experience programmer… only couple of years side hustle, I can’t comment how super amazing it is but… There are a couple of advanced features in it that you can checkout

With neovim you have two options:

  1. You use something like LunarVim
  2. Make a good custom config for neovim and save it. I can link one here.

I’d say on the complexity part… I mean, its a good challenge for people. Learn something new every couple of years.

People like the :wq because it kind of eliminates making bad edits or something you are not sure of… Unlike having an over complicated interface design and the text field is buried into it… It helps focus on the code.

Agreed on the H J K L part, it makes no sense. Never used these keys.

Are the better IDEs/Text editors out there? Probably, maybe… depending on what you actually want.
Neovim is basically build yourself text editor with IDE like advanced features. It seems like Arch Linux or the Linux Platform in general.

I am reading the Micro thread now…

2 Likes

As far as CLI text editor vs Vscode.

VScode is good, thats “when I need a GUI editor”. I actually liked Atom, but its lost funding & support.

I am one of those who, mostly like to use terminal. Debug with gcc / java / python in terminal. I don’t have a good explanation for it, but I basically debug in terminal, its simple for me and I have concrete control and understanding of whats going on. I guess I am old school or something.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.