Allow binding commands

Bind commands with `command:...`

Ref #974
This commit is contained in:
Zachary Yedidia
2018-01-02 15:02:46 -05:00
parent 981263eb81
commit f6e9a16724
3 changed files with 36 additions and 3 deletions

View File

@@ -120,6 +120,13 @@ func DefaultCommands() map[string]StrCommand {
}
}
func CommandAction(cmd string) func(*View, bool) bool {
return func(v *View, usePlugin bool) bool {
HandleCommand(cmd)
return false
}
}
// PluginCmd installs, removes, updates, lists, or searches for given plugins
func PluginCmd(args []string) {
if len(args) >= 1 {