Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Removing whitespace
- ## Sublime Text
- Just drop this in one of your settings files:
- ```
- "trim_trailing_white_space_on_save": true
- ```
- ## Textmate
- Open the bundle editor (⌃⌥⌘B) and open “Text” → “Menu Actions” → “Converting / Stripping” → “Remove Trailing Spaces in Document / Selection”.
- Then in the drawer put ```callback.document.export``` in Semantic Class and ```Document / Replace Document``` as Input / Output.
- ## vim
- One way to make sure to remove all trailing whitespace in a file is to set an autocmd in your .vimrc file. Every time the user issues a :w command, Vim will automatically remove all trailing whitespace before saving.
- ```
- autocmd BufWritePre * :%s/\s\+$//e
- ```
- ## Eclipse
- The IDE has a preference to remove trailing whitespace.
- ```
- Preferences -> Java -> Editors -> Save Actions
- ```
- 1. Check "Perform the selected actions on save"
- 2. Check "Additional actions" and click the "Configure.." button.
- 3. In the "Code organizing" tab, check "Remove trailing whitespace"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement