Which command will delete a word in vi without removing the following space?

Prepare for the LPI Linux Essentials Exam. Study with flashcards and multiple choice questions, each with hints and explanations. Get exam-ready!

In the vi editor, the command 'de' is designed to delete from the cursor's current position to the end of the current word without removing the space that follows it. This command operates under the principle that it will delete everything in the word up to, but not including, the space character that may follow that word.

Using 'de' allows a user to efficiently edit text by removing only the necessary parts of a word while preserving intended spacing. For example, if the cursor is at the beginning of the word and the word is "example", using 'de' will result in the word being deleted but the space afterward will remain intact, so the sentence remains readable and follows proper formatting.

In contrast, the other commands serve different functions: 'dw' deletes the word and the space that follows it, 'd' on its own would remove a range based on the next command provided, and 'df' deletes up to a designated character. Thus, 'de' is the correct choice for the task of deleting a word while keeping the following space.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy