Skip to content

Instantly share code, notes, and snippets.

@xuhdev
Last active August 3, 2016 01:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuhdev/2565b258b562270854c05f2eb813e16d to your computer and use it in GitHub Desktop.
Save xuhdev/2565b258b562270854c05f2eb813e16d to your computer and use it in GitHub Desktop.
Generate an editorconfig file from a gitignore file.
#!/bin/bash
# Generate an editorconfig file from a gitignore file. Usage:
#
# /path/to/gen-editorconfig-from-gitignore.sh < .gitignore >> .editorconfig
while read line
do
if [[ -z $line ]]
then
continue
fi
cat <<-EOF
[$line]
indent_style = none
indent_size = none
tab_width = none
end_of_line = none
charset = none
max_line_length = none
EOF
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment