I use Sublime text
. Now I am trying Atom
. When I save any file in sublime text it does not include any trailing blank line. But saving any file in Atom
leaves a trailing blank line. How do I force Atom
not to leave trailing white spaces?
The "Remove Trailing Whitespace" option is on by default. This means that every time you save any file opened in Atom, it will strip all trailing whitespace from the file. If you want to disable this, go to the whitespace package in your settings panel and uncheck that option.
To remove leading and trailing spaces in Java, use the trim() method. This method returns a copy of this string with leading and trailing white space removed, or this string if it has no leading or trailing white space.
Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline.
Delete Whitelines is an Atom package for removing empty lines. Just Select the text, use command palette (cmd + shift + P) > delete-whitelines:toggle or alt+shift+D (for MAC & windows) to remove empty lines within the selected text area.
Under your Atom Preferences
go to Packages
tab and search for whitespace
. Click on the whitespace
package and uncheck Ensure Single Trailing Newline
option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With