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 –
- Always use Unix line endings (LF) -
- Ensure files end with a new line –
- Automatically detect indentation style –
- Or, failing the above, have a way to quickly switch between indentation styles.
Did you find this post useful?