How do you select all and delete in vi?

How do you select all and delete in vi?
Answer
Delete all lines in VI / VIM editor – Unix / Linux
  1. Go to command mode in the editor by pressing ESC key on the keyboard.
  2. Press gg. It will take to the first line of the file.
  3. Then press dG. This will delete from the first line to the last line.
14 июн. 2012 г.
 

Tìm kiếm

Back
Top