Setting up your editor correctly can make working with other developers much less painful. Below are some things that I believe every developer should do when editing source code. Any good IDE or editor should have settings to do these things automatically - the points below are paired with their Sublime Text setting.
- Trim trailing whitespace -
"trim_trailing_white_space_on_save": true - Always use Unix line endings (LF) -
"default_line_ending": "unix" - Ensure files end with a new line -
"ensure_newline_at_eof_on_save": true - Automatically detect indentation style -
"detect_indentation": true - Or, failing the above, have a way to quickly switch between indentation styles.