Visual Studio Code - delete all blank lines - regex

后端 未结 15 1247
心在旅途
心在旅途 2021-01-29 18:36

I spent some time trying to figure out how to delete all blank lines in Visual Studio Code and I can\'t get it working. Anybody knows how to do it please?

If I search fo

15条回答
  •  佛祖请我去吃肉
    2021-01-29 18:50

    Visual Studio Code 1.13.0 Linux Lite:

    • Hit CTRL+H
    • Select "Use Regular Expression"
    • Find box: ^(\s)*$\n (enter many ending \n as you need)
    • Replace box: empty
    • Click replace all

    Empty lines gone!

提交回复
热议问题