Vim delete blank lines

后端 未结 14 2609
情歌与酒
情歌与酒 2020-12-02 03:33

What command can I run to remove blank lines in Vim?

14条回答
  •  借酒劲吻你
    2020-12-02 03:46

    :g/^$/d
    

    :g will execute a command on lines which match a regex. The regex is 'blank line' and the command is :d (delete)

提交回复
热议问题