mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-10 22:52:51 +09:00
This commit exposes the separate infopane bindings to configuration from the user. This also adds support for separate bindings in the terminal emulator view. Default bindings are provided, but can also be rebound in bindings.json.
22 lines
454 B
Go
22 lines
454 B
Go
package action
|
|
|
|
var termdefaults = map[string]string{
|
|
"<Ctrl-q><Ctrl-q>": "Exit",
|
|
"<Ctrl-e><Ctrl-e>": "CommandMode",
|
|
"<Ctrl-w><Ctrl-w>": "NextSplit",
|
|
}
|
|
|
|
// DefaultBindings returns a map containing micro's default keybindings
|
|
func DefaultBindings(pane string) map[string]string {
|
|
switch pane {
|
|
case "info":
|
|
return infodefaults
|
|
case "buffer":
|
|
return bufdefaults
|
|
case "terminal":
|
|
return termdefaults
|
|
default:
|
|
return map[string]string{}
|
|
}
|
|
}
|