Add support for macros

Closes #270

CtrlU to toggle recording and CtrlJ to playback.
You can also rebind using the "ToggleMacro" and "PlayMacro"
actions.

Note that recursive macros are not yet supported.
This commit is contained in:
Zachary Yedidia
2016-09-06 10:43:45 -04:00
parent 966dac97f8
commit 539495d2f7
6 changed files with 81 additions and 0 deletions

View File

@@ -3,6 +3,8 @@ package main
import (
"os"
"path/filepath"
"reflect"
"runtime"
"strconv"
"strings"
"time"
@@ -217,3 +219,7 @@ func Abs(n int) int {
}
return n
}
func FuncName(i interface{}) string {
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
}