()
| 31 | var commands map[string]Command |
| 32 | |
| 33 | func InitCommands() { |
| 34 | commands = map[string]Command{ |
| 35 | "set": {(*BufPane).SetCmd, OptionValueComplete}, |
| 36 | "setlocal": {(*BufPane).SetLocalCmd, OptionValueComplete}, |
| 37 | "toggle": {(*BufPane).ToggleCmd, OptionValueComplete}, |
| 38 | "togglelocal": {(*BufPane).ToggleLocalCmd, OptionValueComplete}, |
| 39 | "reset": {(*BufPane).ResetCmd, OptionValueComplete}, |
| 40 | "show": {(*BufPane).ShowCmd, OptionComplete}, |
| 41 | "showkey": {(*BufPane).ShowKeyCmd, nil}, |
| 42 | "run": {(*BufPane).RunCmd, nil}, |
| 43 | "bind": {(*BufPane).BindCmd, nil}, |
| 44 | "unbind": {(*BufPane).UnbindCmd, nil}, |
| 45 | "quit": {(*BufPane).QuitCmd, nil}, |
| 46 | "goto": {(*BufPane).GotoCmd, nil}, |
| 47 | "jump": {(*BufPane).JumpCmd, nil}, |
| 48 | "save": {(*BufPane).SaveCmd, nil}, |
| 49 | "replace": {(*BufPane).ReplaceCmd, nil}, |
| 50 | "replaceall": {(*BufPane).ReplaceAllCmd, nil}, |
| 51 | "vsplit": {(*BufPane).VSplitCmd, buffer.FileComplete}, |
| 52 | "hsplit": {(*BufPane).HSplitCmd, buffer.FileComplete}, |
| 53 | "tab": {(*BufPane).NewTabCmd, buffer.FileComplete}, |
| 54 | "help": {(*BufPane).HelpCmd, HelpComplete}, |
| 55 | "eval": {(*BufPane).EvalCmd, nil}, |
| 56 | "log": {(*BufPane).ToggleLogCmd, nil}, |
| 57 | "plugin": {(*BufPane).PluginCmd, PluginComplete}, |
| 58 | "reload": {(*BufPane).ReloadCmd, nil}, |
| 59 | "reopen": {(*BufPane).ReopenCmd, nil}, |
| 60 | "cd": {(*BufPane).CdCmd, buffer.FileComplete}, |
| 61 | "pwd": {(*BufPane).PwdCmd, nil}, |
| 62 | "open": {(*BufPane).OpenCmd, buffer.FileComplete}, |
| 63 | "tabmove": {(*BufPane).TabMoveCmd, nil}, |
| 64 | "tabswitch": {(*BufPane).TabSwitchCmd, nil}, |
| 65 | "term": {(*BufPane).TermCmd, nil}, |
| 66 | "memusage": {(*BufPane).MemUsageCmd, nil}, |
| 67 | "retab": {(*BufPane).RetabCmd, nil}, |
| 68 | "raw": {(*BufPane).RawCmd, nil}, |
| 69 | "textfilter": {(*BufPane).TextFilterCmd, nil}, |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // MakeCommand is a function to easily create new commands |
| 74 | // This can be called by plugins in Lua so that plugins can define their own commands |
no outgoing calls