mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 06:30:28 +09:00
Add support for user-created commands
Plugins can now create their own commands using the `MakeCommand` function. Plugins can also now create their own keybindings with the `BindKey` function. See the go plugin for an example of `MakeCommand`.
This commit is contained in:
@@ -203,6 +203,7 @@ func main() {
|
||||
InitConfigDir()
|
||||
// Load the user's settings
|
||||
InitSettings()
|
||||
InitCommands()
|
||||
InitBindings()
|
||||
// Load the syntax files, including the colorscheme
|
||||
LoadSyntaxFiles()
|
||||
@@ -237,6 +238,8 @@ func main() {
|
||||
L.SetGlobal("messenger", luar.New(L, messenger))
|
||||
L.SetGlobal("GetOption", luar.New(L, GetOption))
|
||||
L.SetGlobal("AddOption", luar.New(L, AddOption))
|
||||
L.SetGlobal("BindKey", luar.New(L, BindKey))
|
||||
L.SetGlobal("MakeCommand", luar.New(L, MakeCommand))
|
||||
|
||||
LoadPlugins()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user