The correct option is:
D. yy
In the vi editor, the command `yy` is used to copy the current line into the vi buffer.
Here's an explanation of each option:
A. `c`: This command is used to change (delete and enter insert mode) the current line, not to copy it.
B. `cc`: This command is used to delete the current line and enter insert mode, not to copy it.
C. `1c`: This command is used to change (delete and enter insert mode) the specified line number, in this case, line 1, not to copy the current line.
D. `yy`: This command yanks (copies) the current line into the vi buffer. The line can then be pasted (put) using the `p` command.
E. `1y`: This command yanks (copies) the specified line number, in this case, line 1, into the vi buffer, not the current line.
Therefore, option D, `yy`, is the correct command to copy the current line into the vi buffer.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Strib
6 months, 4 weeks agoIvandrago
2 years ago