Open colindean opened 3 years ago
It'd be invoked something like fd . --absolute-path --exec editorconfig-changes {}
or fd . --absolute-path | editorconfig - | editorconfig_check-for-patch
.
editorconfig
if given just one file spits out key=value
pairs but spits out INI (may be TOML?) when given multiple files, in the format
[/home/colin/Source/something/pandoc-crossref.yaml]
end_of_line=lf
insert_final_newline=true
charset="utf-8"
trim_trailing_whitespace="false"
[/home/colin/Source/something/refs.bibtex]
end_of_line=lf
insert_final_newline=true
charset="utf-8"
trim_trailing_whitespace="false"
EditorConfig has a binary easily installed with Homebrew. This binary takes a path and splits out the config for that file. Build something around this and
find
orfd
thatend_of_line
: Convert line endings to whatever is specifiedinsert_final_newline
: Inserts a newline if it doesn't end with onecharset
: Convert to the desired charsettrim_trailing_whitespace
: Remove if specified