You are working in the vi normal mode on a file. You locate a word in the file that needs to be deleted and place your cursor at the beginning of that word. Which command should you use to delete this word without deleting the space that follows the word?
  1. dw
  2. de
  3. d$
  4. dd
Explanation
Answer - B - You should use the de command to delete this word without deleting the space that follows the word.

Key Takeaway: Vi is a modal editor that operates in either insert mode or normal mode. Typing i while in normal mode switches the editor to insert mode. Pressing the escape key in the insert mode switches the editor back to normal mode.
Was this helpful? Upvote!
Login to contribute your own answer or details

Top questions

Related questions

Most popular on PracticeQuiz