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:
Francesc Campoy 2014-08-04 15:55:39 -07:00
parent cf8082eec5
commit 82b913fb17
2 changed files with 6 additions and 0 deletions

View File

@ -285,6 +285,9 @@ function PlaygroundOutput(el) {
run();
e.preventDefault();
return false;
} if (e.ctrlKey) { // +control
fmt();
e.preventDefault();
} else {
autoindent(e.target);
}

View File

@ -2307,6 +2307,9 @@ function PlaygroundOutput(el) {
run();
e.preventDefault();
return false;
} if (e.ctrlKey) { // +control
fmt();
e.preventDefault();
} else {
autoindent(e.target);
}