How can I delete multiple lines in vi?

后端 未结 11 1135
天命终不由人
天命终不由人 2021-01-29 20:53

I have tried to follow the following:

How to delete selected text in VI editor

but

5dd

gives

E492: Not a

11条回答
  •  被撕碎了的回忆
    2021-01-29 21:21

    1. Esc to exit insert mode
    2. :1enter go to line 1 (replace '1' with the line you are interested in)
    3. 5dd delete 5 lines (from the current line)

    Type :set number (for numbered lines).

提交回复
热议问题