← Back to context

Comment by skydhash

1 day ago

The rant is fine. I'll just provide some explanation.

First: Vim comes from vi, which is a visual mode for ex, which is a supercharged version of ed, which is (the standard editor) a line editor. With ed, you don't really write, you issue commands that does things to the file. Think of the file as a long roll of paper and the program as an assistant. So a command could be "replace your on line 14 with you're" or "delete line 34 to 45". Ex added more commands, Vi made it interactive, and Vim added even more features (syntax highlighting, scripting, location list,...). But still the same mode of interaction remains. The cursor is what you control. It's not just an indicator where the next character will appear or be deleted. It's the starting point of more powerful interactions.

Second. You're not supposed to move the cursor that much in insert mode. For 3 characters to the left, I just backspace and rewrite. For more, I go to normal mode and use F, f, T, or t which will land me to the character I want. Then I can use something like x (delete character) or r (replace character) without having to enter insert mode. There's a lot of movement beside hjkl, and I rarely uses h or l for things that further away than two characters.

Third. There's not a lot of key on the keyboard. $ is end of line in most regex dialect, ^ is beginning of line which would be actually the first character, but most people would assume it's the first non-whitespace character, so that's how they went. In C, curly braces mark blocks of code, so it's a small leap to use it for blocks of text, aka paragraphs.

Fourth. My mnemonics are f (find) and t (to). The latter does not include the character.

Firth. A lot of people remaps the caps lock to either Ctrl or ESC.

Sixth. They're different computers so there's no shared clipboard. Sharing information between the clipboard can be done using escape sequences, but I've never bother to. I just maximize the current buffer so I can use the terminal selection. And if I wanted more than a screen (dmesg), I'd pipe the command to a file and then download that file with sftp.

Seventh. Jetbrains only have debuggers for a handful of programming languages while `printf` is universal. And there's no law forbidding installing an IDE alongside your editor.