Skip to content

Instantly share code, notes, and snippets.

@mkhl
Created April 1, 2019 20:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkhl/5e4cda4f9a262f432eacd592aba5fd54 to your computer and use it in GitHub Desktop.
Save mkhl/5e4cda4f9a262f432eacd592aba5fd54 to your computer and use it in GitHub Desktop.
EditorConfig support for Acme
#!/usr/local/plan9/bin/rc
. 9.rc
. $PLAN9/lib/acme.rc
fn convert {
awk -F'=' '
$1 == "indent_style" {
print "Spaces", ($2 == "space") ? "on" : "off"
}
$1 == "tab_width" {
print "Tab", $2
}
'
}
event=$1
target=$2
switch($event$target) {
case new/*
editorconfig $target | convert | acmeeval
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment