173k views
4 votes
Say we had a file with just the single line "ok here" and we opened it in Vim with the cursor at the very beginning, then typed c l a s. What would be the contents of the buffer after?

a) "ok here"
b) "clas here"
c) "class here"
d) "here ok"

User Pritaeas
by
7.1k points

1 Answer

2 votes

Final answer:

If we open a file in Vim with the cursor at the beginning and type 'clas', the buffer will contain 'clas here'. Hence, b) is correct.

Step-by-step explanation:

If we open a file in Vim with the cursor at the very beginning and type 'clas', the contents of the buffer will be 'clas here'. This is because the 'c' command in Vim deletes the characters under the cursor and enters insert mode, while the 'l', 'a', and 's' commands simply insert those characters into the buffer. Therefore, 'ok here' gets replaced with 'clas', and 'here' remains unchanged.

User Mhawksey
by
7.5k points