Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/editorconfig-sublime
Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
https://github.com/sindresorhus/editorconfig-sublime
editorconfig python sublime-package sublime-text sublime-text-plugin
Last synced: 27 days ago
JSON representation
Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
- Host: GitHub
- URL: https://github.com/sindresorhus/editorconfig-sublime
- Owner: sindresorhus
- License: mit
- Created: 2012-05-30T21:50:07.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2023-12-10T21:10:24.000Z (11 months ago)
- Last Synced: 2024-05-22T18:23:22.318Z (6 months ago)
- Topics: editorconfig, python, sublime-package, sublime-text, sublime-text-plugin
- Language: Python
- Homepage:
- Size: 71.3 KB
- Stars: 1,764
- Watchers: 35
- Forks: 108
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- sublime-bookmarks - EditorConfig
README
# EditorConfig
> [EditorConfig](https://editorconfig.org) helps developers maintain consistent coding styles between different editors
## Install
Install `EditorConfig` with [Package Control](https://packagecontrol.io) and restart Sublime.
## Getting started
See the [EditorConfig site][] for documentation.
## Supported properties
- root
- indent_style
- indent_size
- end\_of\_line
- charset
- trim_trailing_whitespace
- insert_final_newlineExplanation of the properties can be found on the [EditorConfig site][].
The `tab_width` property is intentionally not supported.
## Example file
*My recommended default settings*
```ini
root = true[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
```## Tips
### EditorConfig snippet
If you can't remember all settings managed by the EditorConfig file, you'll love the `editorconfig` snippet.
Just type `editorconfig` + tab, and your editor will focus on the first setting's value (indent_style = *lf*). You can change the value, if you want, and jump to the next setting's value by hitting tab and so on. Settings are somewhat autocompleted, and if you don't remember all possible values, simply remove the setting value to see them all as a comment.
You can be in a context where `editorconfig` + tab trigger another snippet. In that case, simply use `Goto anywhere` (Ctrl + P on Linux/Windows or ⌘ + P on macOS), type `editorconfig`, select `Snippet: editorconfig` and hit Enter.
### View active config
The active config is printed in the Sublime console.
### Trailing whitespace
Even though there is a `trim_trailing_whitespace` property. I would still recommend you set `"draw_white_space": "all"` and/or `"trim_trailing_white_space_on_save": true` in your Sublime settings to prevent you from accidentally committing whitespace garbage whenever a project is missing a .editorconfig file.
[EditorConfig site]: https://editorconfig.org