· 3 min read

Your text editor is not editing

Can you actually call VSCode a text editor? Does it actually... edit text?

Most of us should know what a text editor is. But have we actually thought about what it really is? I was watching a video about Vim (not so) recently, this one in particular, he mentioned that “A text editor edits text”. Even though it sounded rhetorical, I understood what he meant.

What exactly is editing?

Editing text is the process of transforming text from one state to another. To go from one state to another, we need to perform operations on the text. These operations include inserting text, deleting text, moving text around, replacing text and so on.

Does VSCode edit?

What happens if you press a letter key in VSCode? A character is inserted at the current cursor position. Or how about the number keys, or punctuation keys? They all insert text. Inserting is just one part of editing, but it is the primary operation of VSCode. Can we really call VSCode a text editor?

What about Vim?

Let’s look at what the letter keys, number keys, and punctuation keys do in Vim. In normal mode, they do not insert text. Instead, they are used to move the cursor around, and to perform other editing operations, such as deleting text, replacing text, and moving text. To insert text, you need to enter insert mode.

While it makes inserting text a bit more cumbersome, it embraces the idea that editing is more than just inserting text.

Is moving the cursor editing?

This was a question that came up as I was writing this blog post, whether moving the cursor is part of editing. After some thought, I believe the answer is yes.

Consider the less program. It has no editing capabilities, it is purely a text viewer. Since it is a text viewer, it does not have a cursor. And there is no need for a cursor, since you cannot edit the text. If you lose your position in the text, you can always use your finger to point at the screen. Therefore, a cursor is only needed when you can edit the text, therefore moving the cursor should be considered part of editing.

What’s wrong with using text inserters?

As much as I love Vim, and I hope everyone should give it a try, I’m not saying that text inserters are bad, or that you should not use them. They are good for inserting text, you should use it if you’re inserting text.

However, in the age of AI, text inserters are becoming less relevant. With AI, you can generate and insert text with a few keystrokes, and it is a lot more efficient than typing out the text yourself. However, since AI hallucinates, you may still want to edit the generated text, and for that, you should be using a real text editor.

Can VSCode become a text editor?

Sure, once you install the Vim extension.

Conclusion

In conclusion, a text editor is a tool that allows you to edit text. Editing text is more than just inserting text, it includes deleting text, moving text around, replacing text and so on. If your primary operation is inserting text, can you really call it a text editor?

    Share:
    Back to Blog

    Related Posts

    View All Posts »