editorconfig icon indicating copy to clipboard operation
editorconfig copied to clipboard

[FEATURE] Generic block for text files (exclude binary)

Open Silex opened this issue 1 month ago • 0 comments

Which problem does this feature fix?

I was told in https://github.com/editorconfig/editorconfig-emacs/issues/378 that charset and insert_final_newline will create problems with binary files.

Here is my config:

root = true

[*]
# Use spaces for indentation
indent_style = space
# Each indent should contain 2 spaces
indent_size = 2
# Use Unix line endings
end_of_line = lf
# The files are utf-8 encoded
charset = utf-8
# No whitespace at the end of line
trim_trailing_whitespace = true
# A file must end with an empty line - this is good for version control systems
insert_final_newline = true
# A line should not have more than this amount of chars (not supported by all plugins)
max_line_length = 120

Describe the solution you'd like

Some way to have a [text] selector that only matches text files, that way binary files are ignored.

Additional context

#404 might be related.

Silex avatar Nov 14 '25 19:11 Silex