Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. # Removing whitespace
  2.  
  3. ## Sublime Text
  4. Just drop this in one of your settings files:
  5.  
  6. ```
  7. "trim_trailing_white_space_on_save": true
  8. ```
  9.  
  10. ## Textmate
  11. Open the bundle editor (⌃⌥⌘B) and open “Text” → “Menu Actions” → “Converting / Stripping” → “Remove Trailing Spaces in Document / Selection”.
  12.  
  13. Then in the drawer put ```callback.document.export``` in Semantic Class and ```Document / Replace Document``` as Input / Output.
  14.  
  15. ## vim
  16. 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.
  17.  
  18. ```
  19. autocmd BufWritePre * :%s/\s\+$//e
  20. ```
  21.  
  22. ## Eclipse
  23. The IDE has a preference to remove trailing whitespace.
  24.  
  25. ```
  26. Preferences -> Java -> Editors -> Save Actions
  27. ```
  28.  
  29. 1. Check "Perform the selected actions on save"
  30. 2. Check "Additional actions" and click the "Configure.." button.
  31. 3. In the "Code organizing" tab, check "Remove trailing whitespace"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement