Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer all of the questions. Thank You! There is an open file in Vim cont

ID: 3813658 • Letter: P

Question

Please answer all of the questions. Thank You!

There is an open file in Vim containing the following text: This is; a; line; The cursor is at the character n in "line". What is difference in the resultant cursor movement if you enter the command e or E? In Vim, how do I delete the next 4 words on the line after the cursor? There are two directories, One and Two, under the current directory, with the following contents: One: fileOne.txt, fileTwo.txt Two: fileThree.txt, fileFour.txt What are the resulting contents of both directories after the following set of commands: cp One/fileone.txt Two/rm One/fileone.txt

Explanation / Answer

1. e command takes the cursor to the end of the current word. Here word ends on space or on semicolon.

So, if cursor is at letter n in "line" then after pressing 'e' cursor would move to end of word "line". Hence, cursor would move to letter 'e' in "line"

E command takes the cursor the end of the Word where words are defined by space separated sequence of alphanumeric characters.

So, if cursor is at letter n in "line" then after pressing 'E' cursor would move to end of word "line". Hence, cursor would move to semicolon ';' after word "line".

2. You could use 4dw

Here, 4 is for delete 4 words

d is for delete

w is for going forward one word

3.

cp One/fileOne.txt Two/

It copied fileOne.txt of directory One to directory Two

rm One/fileOne.txt

It delete fileOne.txt from directory One

So, after above operation contents of directories would be

One: fileTwo.txt

Two: fileThree.txt  fileFour.txt fileOne.txt

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote