playground: add ctrl-enter shortcut for gofmt (as in the tour)
LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/120420044
This commit is contained in:
parent
cf8082eec5
commit
82b913fb17
|
|
@ -285,6 +285,9 @@ function PlaygroundOutput(el) {
|
||||||
run();
|
run();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
} if (e.ctrlKey) { // +control
|
||||||
|
fmt();
|
||||||
|
e.preventDefault();
|
||||||
} else {
|
} else {
|
||||||
autoindent(e.target);
|
autoindent(e.target);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2307,6 +2307,9 @@ function PlaygroundOutput(el) {
|
||||||
run();
|
run();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
} if (e.ctrlKey) { // +control
|
||||||
|
fmt();
|
||||||
|
e.preventDefault();
|
||||||
} else {
|
} else {
|
||||||
autoindent(e.target);
|
autoindent(e.target);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue