Re:Vim for Humans
by GrinningFool on Monday October 17, 2016 @04:34PM
(#12729458)
- [2] Command-Left to move to the beginning of the line
- [3] Shift-Command-Right to select to the end of the line
- [2] Command-C to copy
- [2] Command-V to paste
Total keypresses: 9Total keypresses for yyp: 3 (4 if you have to esc to normal mode first)
My point being that even the simple and straightforward actions you provided are more complex than they seem.
Firstly, that's 6 keypresses, because you don't need to lift your finger off Command.
Secondly, that's just using the minimal set of shortcuts that work anywhere. If you're in an actual editor, it almost certainly has a shortcut like Ctrl-Shift-D for duplicate line.
And I think a lot of vim users might be surprised how simple and straightforward things can be in a modern editor.
Re:Vim for Humans
by GrinningFool on Tuesday October 18, 2016 @01:12AM
(#12732284)
Absolutely right on the six, my bad.
Sublime, at least, has a duplicate line command. I believe you can also use the copy command with no text selected to copy the current line. None of your examples seem nearly as effective as pressing yy to copy the line and p to paste below.
Atom is the same.
How composable are those commands? The best thing about vim is that it works with text objects, so yy will select a line but yw will select a word, yip select a paragraph, yi( will select in the function call, etc.
Similarly, if I want to change them or delete them the y becomes a c or d.
Sure, but who does that?
In any text editor on the Mac its:
One annoying thing about that, though, is that it doesn't copy the newline itself, so if you want to paste the line and the line terminator multiple times, you need to do something more like: But, of course, most full-featured text editors make that easier. In Sublime and Atom, it's: