MCPcopy
hub / github.com/sindresorhus/editorconfig-sublime

github.com/sindresorhus/editorconfig-sublime @v1.2.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.2.1 ↗
41 symbols 122 edges 9 files 21 documented · 51%
README

EditorConfig

EditorConfig helps developers maintain consistent coding styles between different editors

Install

Install EditorConfig with Package Control 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_newline

Explanation of the properties can be found on the EditorConfig site.

The tab_width property is intentionally not supported.

Example file

My recommended default settings

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.

Core symbols most depended-on inside this repo

init
called by 4
plugin.py
usage
called by 3
editorconfig/main.py
debug
called by 2
plugin.py
get_configurations
called by 2
editorconfig/handler.py
unexpanduser
called by 1
plugin.py
log
called by 1
plugin.py
apply_pre_save
called by 1
plugin.py
apply_config
called by 1
plugin.py

Shape

Method 17
Function 16
Class 8

Languages

Python100%

Modules by API surface

plugin.py13 symbols
editorconfig/handler.py7 symbols
editorconfig/ini.py6 symbols
editorconfig/fnmatch.py4 symbols
editorconfig/exceptions.py4 symbols
editorconfig/main.py3 symbols
editorconfig/versiontools.py2 symbols
editorconfig/compat.py1 symbols
editorconfig/__init__.py1 symbols

For agents

$ claude mcp add editorconfig-sublime \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact