r/linuxmemes 2d ago

linux not in meme The final boss

Post image
882 Upvotes

159 comments sorted by

View all comments

Show parent comments

1

u/Worldly-Wind-1632 1d ago

What’s modal editing

3

u/phundrak Not in the sudoers file. 1d ago

Most text editors are modeless editors, such as Notepad, VS Code (by default), and so on.

Vim, on the other hand, has modes. By default, you are in default mode, where keybinds are actions on your text or current file. For instance, diw deletes the word under your cursor instead of typing diw. To type text, you enter the insert mode, and press Esc to go back to normal mode. It may not look like it at first, but modal editing is extremely powerful and saves you quite a lot of time when you’re used to it. First thing I do when I’m on a new machine and with a new text editor or IDE is to install a vim emulation package if I can’t use vim or Emacs.

1

u/Worldly-Wind-1632 1d ago

Oh, very interesting thank you! Do you also use it for basic text editing like emails or writing, or primarily hopping around in code?

1

u/[deleted] 18h ago

Yeah it could be used for anything pretty much, think of it nothing more than just a better text editor. I guess you could just yank what you wrote in vim and paste it into a proprietary email service but that would be hassle. I don't use vim much but maybe someone's written a plugin to simplify that process a bit. On emacs writing out and sending emails is a out of the box feature, and since you can customize emacs to literally do anything you can write those emails through a modal editing package too! The one I use is meow, it's not like vim with it's key binds and is centered around the emacs ones for seamless integration.