sublime批量剔除空行

批量剔除空行

方法:1

CTRL+H打开replace功能,勾选上左侧的regular expression,并填写
find what栏 : \s+$ (正则表达式)
replace with栏 : (这行留空)
接着点replace all即可

方法:2

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

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

find what栏 : \s+$
replace with栏 : (这行留空)

接着点replace all即可

猜你喜欢

转载自blog.csdn.net/qq_19782697/article/details/89089412