Skip to content

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

@Silex

Description

@Silex

Which problem does this feature fix?

I was told in editorconfig/editorconfig-emacs#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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions