It's funny, but I find it harder to memorize such key combinations in comparison to vim's operators. Those key combinations just seem rather arbitrarily chosen, while with ci", it's very clear what it does: Change Inner/Inside ".
It's actually pretty intuitive. Shift is for highlighting (like everywhere), ctrl is to select by a group (again like everywhere) and space is to select by context. Only the space you have to remember or learn. Vi is the only editor you have to learn in order to do anything. With most other editors you could browse a quick list of shortcuts after using it for about 1 month, you'd already know most of them just by guessing/it being the same for most programs, and the rest you could learn in 15 minutes.
Why is delete a line DD. Why not DL? Same with CC(Change line)
I can't say what the reason behind picking that combination is, other than the fact that this function was naturally copied from vim's predecessor, vi. However, I think dd is far faster to type than dl, and the same goes for cc. It's also a "pattern" across various commands: dd deletes a single line, cc changes a single line, and yy copies a single line into register 0.
Also, mind those caps. "DD" is not the same as "dd". (And why would a decent text editor force you to press shift for that?)
Why is $ end of line?
I'm not sure, either, because vim and vi have been existing since ages and non-graphical systems were naturally far more common back then. However, a modern reasoning would be that regular expressions also use $ to symbolize the end of a line.
(According to Wikipedia, the dollar sign has been used since 40 years for this purpose, which consequently was why regular expressions used the dollar sign just in the same way.)
Sometimes things just are arbitrarily chosen. They have to pick SOMETHING, and that keyboard shortcut makes the most sense to the devs.
Yeah, they do. But I think we can also agree on this: Unlike new text editors like gedit or Sublime Text which have been developed essentially from ground up with modern computers and OSes in mind, vim and Emacs have a very, very long history.
the arrow keys didn't exist on the terminal vi's creator used.
I'm pretty sure they had arrow keys. But hjkl are right underneath your fingers. Most of the time, you have to reach for arrow keys, which slows you down.
3
u/Tenobrus Oct 05 '13
Shift+Ctrl+Space is actually just "expand selection to context", so it will still work. Or Shift+Ctrl+D, which is specifically "expand to brackets".