The Double-Jump

By convention pressing any command twice will tell it to operate on the current line.

If you want to yank (copy) the current line, press yy.

If you want to delete the current line, press dd.

If you want to change (retype) the current line, press cc.

This is a pretty consistent convention, down to the special case of "save and exit" being ZZ.

Doing operations on the entire current line is very common, and it made sense to make it convenient.

No comments:

Post a Comment