Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultInsertKeyMap, _ = buildInsertKmapFromConfig(mergeKeys(DefaultKeyMapConfig["Shared"], DefaultKeyMapConfig["Insert"]))
View Source
var DefaultKeyMap = KeyMap{ Normal: DefaultNormalKeyMap, Insert: DefaultInsertKeyMap, Visual: DefaultVisualKeyMap, }
View Source
var DefaultKeyMapConfig = map[string]map[string]string{
"Shared": {
"Up": "k",
"UpFive": "K",
"Down": "j",
"DownFive": "J",
"QuitNoWarning": "ctrl+c",
"Yank": "y",
"ToggleCompletion": " ",
"JumpUp": "{",
"JumpDown": "}",
},
"Normal": {
"QuitWithWarning": "q",
"NewTask": "n",
"NewBefore": "O",
"NewAfter": "o",
"EditTask": "i",
"ClearAndEdit": "x",
"DeleteTask": "d",
"EnableVisualMode": "v",
"PasteAfter": "p",
"PasteBefore": "P",
"Write": "w",
},
"Insert": {
"Discard": "esc",
"Save": "enter",
},
"Visual": {
"NormalMode": "esc",
"Delete": "d",
},
}
View Source
var DefaultNormalKeyMap, _ = buildNormalKmapFromConfig(mergeKeys(DefaultKeyMapConfig["Shared"], DefaultKeyMapConfig["Normal"]))
View Source
var DefaultVisualKeyMap, _ = buildVisualKmapFromConfig(mergeKeys(DefaultKeyMapConfig["Shared"], DefaultKeyMapConfig["Visual"]))
Functions ¶
Types ¶
type InsertKeyMap ¶
func (InsertKeyMap) FullHelp ¶
func (k InsertKeyMap) FullHelp() [][]key.Binding
FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.
func (InsertKeyMap) ShortHelp ¶
func (k InsertKeyMap) ShortHelp() []key.Binding
ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.
type KeyMap ¶
type KeyMap struct {
Normal NormalKeyMap
Insert InsertKeyMap
Visual VisualKeyMap
}
type NormalKeyMap ¶
type NormalKeyMap struct {
Up key.Binding
UpFive key.Binding
Down key.Binding
DownFive key.Binding
QuitWithWarning key.Binding
QuitNoWarning key.Binding
NewTask key.Binding
NewBefore key.Binding
NewAfter key.Binding
EditTask key.Binding
ClearAndEdit key.Binding
DeleteTask key.Binding
ToggleCompletion key.Binding
EnableVisualMode key.Binding
Yank key.Binding
PasteAfter key.Binding
PasteBefore key.Binding
Write key.Binding
JumpUp key.Binding
JumpDown key.Binding
}
func (NormalKeyMap) FullHelp ¶
func (k NormalKeyMap) FullHelp() [][]key.Binding
FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.
func (NormalKeyMap) ShortHelp ¶
func (k NormalKeyMap) ShortHelp() []key.Binding
ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.
type VisualKeyMap ¶
type VisualKeyMap struct {
Up key.Binding
Down key.Binding
UpFive key.Binding
DownFive key.Binding
NormalMode key.Binding
QuitNoWarning key.Binding
Delete key.Binding
Yank key.Binding
ToggleCompletion key.Binding
JumpUp key.Binding
JumpDown key.Binding
}
func (VisualKeyMap) FullHelp ¶
func (k VisualKeyMap) FullHelp() [][]key.Binding
FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.
func (VisualKeyMap) ShortHelp ¶
func (k VisualKeyMap) ShortHelp() []key.Binding
ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.
Click to show internal directories.
Click to hide internal directories.