Sublime Text批量删除空白行

Sublime Text批量删除空白行

  • 替换处理

CTRL+H 打开 replace 功能,勾选上左侧的 regular expression,并填写

find what栏: s+$ (正则表达式)

replace with栏: (这行留空)

接着点 replace all

  • 修改保存时配置

点击菜单栏上的 Preferences,找到 Setting-Default,搜索 trim_trailing_white_space_on_save,

然后将false改为true,设为true时,将在保存的时候去除行尾的空格。

@ Set to true to removing trailing white space on save 
"trim_trailing_white_space_on_save": false
WARNING: No any other purpose,keeping reminded! So sorry to offended,if necessary, contact me and I do change what I had done to protect your privileges!
原文地址:https://www.cnblogs.com/MimiSnowing/p/14956873.html