LoginSignup
5
3

More than 5 years have passed since last update.

sublime text > 行末の空白削除 > trim_trailing_white_space_on_save / パッケージ TrailingSpaces

Last updated at Posted at 2015-09-29

http://qiita.com/shingargle/items/047f759f339398ff836d
を見ていて、よく使うsublime textではどうだろうかと調べた。

参考ページ http://megane-blog.com/2014/08/15/1284

"trim_trailing_white_space_on_save": true
これでファイル保存のたびに、行末の不要なスペースやタブが自動的に削除されます。

自動削除では問題がある場合は、同じ参考ページに記載があるTrailingSpacesを使えばよさそう。

もし自動的に消えるのが、Git管理とかでノイズになってしまうということであれば手動で削除する。その場合は、パッケージ TrailingSpaces。文末など不要なスペースに色をつけて警告してくれる。



(追記 2015/10/02)
以下に記載したが、どうもTrailing Spacesを入れておくと、Sublime Text側でファイルが開いた状態が保持されるのではないかと思うエラーが見られた。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3