Open max-rocket-internet opened 4 years ago
Targeting a specific language is already covered in the README.
For per-project config, try Atomic Management. It works for my case where I need to disable ensureSingleTrailingNewline
for all languages in a project. Your .atom/config.cson
would look something like this:
'.source.python':
whitespace:
removeTrailingWhitespace: false
By the way, maybe you already know this, but PEP 8 recommends avoiding trailing whitespace entirely in Python, including lines containing only whitespace:
Avoid trailing whitespace anywhere. Because it's usually invisible, it can be confusing: e.g. a backslash followed by a space and a newline does not count as a line continuation marker. Some editors don't preserve it and many projects (like CPython itself) have pre-commit hooks that reject it.
Hypothetically, if the trailing whitespace is inside triple-quoted strings, as a workaround you could replace it with escapes, like \x20
for a space.
@max-rocket-internet FYI, I updated my above comment cause I found a solution and my original suggestion about a keymap was bogus.
I'm here because I need to stop Atom from removing trailing whitespace and blank lines containing spaces for a particular Python project.
I just want to know how to:
It seems there is only a very brief project README and no other docs or examples?