博主使用的是:sublimetext3css
設置位置:preferences-->settings user
添加內容 :"trim_trailing_white_space_on_save": true
html
案例ui
{ "ignored_packages": [ "Vintage" ], "trim_trailing_white_space_on_save": true }
設置位置:preferences-->settings user
添加內容 :"ensure_newline_at_eof_on_save": true
url
案例spa
{ "ignored_packages": [ "Vintage" ], "trim_trailing_white_space_on_save": true, "ensure_newline_at_eof_on_save": true, }
ctr+` 後在下端的輸入欄中 輸入
import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
1 ctr+shift+p 2 輸入install package 回車 設置: preferences-->package settings-->html/css/js pretiffy 將 "format_on_save": false 設置成 "format_on_save": true,