commands.json 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. {
  2. commands: {
  3. elements: [
  4. {elem: "Buffer", },
  5. ],
  6. modes: {
  7. // -1 is the default parent mode
  8. "0": {name: "Normal", cascade: -1, },
  9. "10": {name: "Autocomplete", cascade: 0, },
  10. "11": {name: "AutocompleteOpts", cascade: 0, },
  11. "666": {name: "VIM", },
  12. "667": {name: "VIM Insert", },
  13. "668": {name: "VIM Replace", },
  14. "669": {name: "VIM Visual", },
  15. },
  16. overlays: {
  17. "goto": {name: "GotoLine", flags: ["showGoToLineBar"]},
  18. "1": {name: "Find", flags: ["showFindBar"] },
  19. },
  20. keyConfig: [
  21. {elem: "Main", cmd: "EnterLayoutMode", mods: "A", key: "l", amt: 1},
  22. {mode: 10, elem: "Main", cmd: "ExitLayoutMode", mods: "", key: "XK_Escape", amt: 1},
  23. {mode: 10, elem: "Main", cmd: "ExpandPanesX", mods: "", key: "x", amt: 1},
  24. {mode: 10, elem: "Main", cmd: "ExpandPanesX", mods: "S", key: "x", amt: -1},
  25. {mode: 10, elem: "Main", cmd: "ExpandPanesY", mods: "", key: "y", amt: 1},
  26. {mode: 10, elem: "Main", cmd: "ExpandPanesY", mods: "S", key: "y", amt: -1},
  27. {elem: "Main", cmd: "NextTab", mods: "A", key: "XK_Right", amt: 1},
  28. {elem: "Main", cmd: "PrevTab", mods: "A", key: "XK_Left", amt: 1},
  29. {elem: "Main", cmd: "MoveTabR", mods: "AS", key: "XK_Right", amt: 1},
  30. {elem: "Main", cmd: "MoveTabL", mods: "AS", key: "XK_Left", amt: 1},
  31. {elem: "Main", cmd: "SortTabs", mods: "AS", key: "s", amt: 1},
  32. {elem: "Main", cmd: "FocusPaneRelX", mods: "AT", key: "XK_Right", amt: 1},
  33. {elem: "Main", cmd: "FocusPaneRelX", mods: "AT", key: "XK_Left", amt: -1},
  34. {elem: "Main", cmd: "FocusPaneRelY", mods: "AT", key: "XK_Up", amt: -1},
  35. {elem: "Main", cmd: "FocusPaneRelY", mods: "AT", key: "XK_Down", amt: 1},
  36. {elem: "Main", cmd: "GoToTab", mods: "A", key: "1", amt: 0},
  37. {elem: "Main", cmd: "GoToTab", mods: "A", key: "2", amt: 1},
  38. {elem: "Main", cmd: "GoToTab", mods: "A", key: "3", amt: 2},
  39. {elem: "Main", cmd: "GoToTab", mods: "A", key: "4", amt: 3},
  40. {elem: "Main", cmd: "GoToTab", mods: "A", key: "5", amt: 4},
  41. {elem: "Main", cmd: "GoToTab", mods: "A", key: "6", amt: 5},
  42. {elem: "Main", cmd: "GoToTab", mods: "A", key: "7", amt: 6},
  43. {elem: "Main", cmd: "GoToTab", mods: "A", key: "8", amt: 7},
  44. {elem: "Main", cmd: "GoToTab", mods: "A", key: "9", amt: 8},
  45. {elem: "Main", cmd: "GoToTab", mods: "A", key: "0", amt: 9},
  46. {elem: "Main", cmd: "QuitWithoutSave", mods: "CS", key: "q", amt: 0},
  47. {elem: "Main", cmd: "OpenFileBrowser", mods: "", key: "XK_F2", amt: 0},
  48. {elem: "Main", cmd: "FuzzyOpener", mods: "", key: "XK_F4", amt: 0},
  49. {elem: "Main", cmd: "GrepOpen", mods: "CS", key: "g", amt: 0},
  50. {elem: "Main", cmd: "Calculator", mods: "T", key: "/", amt: 0},
  51. {elem: "Main", cmd: "SimpleWindowTest", mods: "C", key: "u", amt: 0},
  52. {elem: "Main", cmd: "CloseTab", mods: "CS", key: "w", amt: 0},
  53. {elem: "Main", cmd: "NewEmptyBuffer", mods: "CS", key: "n", amt: 0},
  54. {elem: "Main", cmd: "MainMenu", mods: "A", key: "m", amt: 0},
  55. {elem: "Main", cmd: "Terminal", mods: "T", key: "t", amt: 0},
  56. {elem: "Main", cmd: "OpenConjugate", mods: "C", key: "h", amt: ["c", "h"]},
  57. {elem: "Main", cmd: "FontNudgeWidth", mods: "CAT", key: "XK_Next", amt: -1},
  58. {elem: "Main", cmd: "FontNudgeWidth", mods: "CAT", key: "XK_Prior", amt: 1},
  59. {elem: "Main", cmd: "FontNudgeCenter", mods: "CAT", key: "XK_Home", amt: 1},
  60. {elem: "Main", cmd: "FontNudgeCenter", mods: "CAT", key: "XK_End", amt: -1},
  61. {elem: "Buffer", cmd: "ToggleGDBBreakpoint", mods: "A", key: "b", amt: 0},
  62. {elem: "FuzzyMatcher", cmd: "Exit", mods: "", key: "XK_Escape", amt: 0},
  63. {elem: "FuzzyMatcher", cmd: "MoveCursorV", mods: "", key: "XK_Up", amt: -1},
  64. {elem: "FuzzyMatcher", cmd: "MoveCursorV", mods: "", key: "XK_Down", amt: 1},
  65. {elem: "FuzzyMatcher", cmd: "OpenFile", mods: "", key: "XK_Return", amt: 0},
  66. {elem: "GrepOpen", cmd: "Exit", mods: "", key: "XK_Escape", amt: 0},
  67. {elem: "GrepOpen", cmd: "MoveCursorV", mods: "", key: "XK_Up", amt: -1},
  68. {elem: "GrepOpen", cmd: "MoveCursorV", mods: "", key: "XK_Down", amt: 1},
  69. {elem: "GrepOpen", cmd: "OpenFile", mods: "", key: "XK_Return", amt: 0},
  70. {elem: "FileBrowser", cmd: "CursorMoveNoWrap", mods: "", key: "XK_Up", amt: -1},
  71. {elem: "FileBrowser", cmd: "CursorMoveNoWrap", mods: "", key: "XK_Down", amt: 1},
  72. {elem: "FileBrowser", cmd: "CursorMoveNoWrap", mods: "C", key: "XK_Up", amt: -5},
  73. {elem: "FileBrowser", cmd: "CursorMoveNoWrap", mods: "C", key: "XK_Down", amt: 5},
  74. {elem: "FileBrowser", cmd: "UpDir", mods: "", key: "XK_BackSpace", amt: 0},
  75. {elem: "FileBrowser", cmd: "SmartOpen", mods: "", key: "XK_Return", amt: 0},
  76. {elem: "FileBrowser", cmd: "ToggleSelect", mods: "", key: "XK_space", amt: 0},
  77. /*{elem: "FileBrowser", cmd: "JumpToLetter", mods: "", key: "", amt: 0}, */
  78. {elem: "Buffer", cmd: "MoveCursorH", mods: "", key: "XK_Left", amt: -1, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  79. {elem: "Buffer", cmd: "MoveCursorH", mods: "", key: "XK_Right", amt: 1, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  80. {elem: "Buffer", cmd: "MoveCursorV", mods: "", key: "XK_Up", amt: -1, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  81. {elem: "Buffer", cmd: "MoveCursorV", mods: "", key: "XK_Down", amt: 1, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  82. {elem: "Buffer", cmd: "Backspace", mods: "", key: "XK_BackSpace", amt: 0, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "rehighlight"]},
  83. {elem: "Buffer", cmd: "Delete", mods: "", key: "XK_Delete", amt: 0, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "rehighlight"]},
  84. {elem: "Buffer", cmd: "SplitLineIndent", mods: "", key: "XK_Return", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak", "rehighlight"]},
  85. {elem: "Buffer", cmd: "MovePage", mods: "", key: "XK_Prior", amt: -1, flags: ["undoSeqBreak"]},
  86. {elem: "Buffer", cmd: "MovePage", mods: "", key: "XK_Next", amt: 1, flags: ["undoSeqBreak"]},
  87. {elem: "Buffer", cmd: "ScrollScreenPctV", mods: "S", key: "XK_Prior", amt: -50, },
  88. {elem: "Buffer", cmd: "ScrollScreenPctV", mods: "S", key: "XK_Next", amt: 50, },
  89. {elem: "Buffer", cmd: "ScrollLinesV", mods: "T", key: "XK_Up", amt: -5, },
  90. {elem: "Buffer", cmd: "ScrollLinesV", mods: "T", key: "XK_Down", amt: 5, },
  91. // {elem: "Buffer", cmd: "ScrollColsH", mods: "", key: "BLUR_FindBox", amt: 5, },
  92. // {elem: "Buffer", cmd: "ScrollColsH", mods: "", key: "FOCUS_FindBox", amt: -5, },
  93. {elem: "Buffer", cmd: "ScrollColsH", mods: "T", key: "XK_Left", amt: -5, },
  94. {elem: "Buffer", cmd: "ScrollColsH", mods: "T", key: "XK_Right", amt: 5, },
  95. {elem: "Buffer", mods: "CT", key: "XK_Right", meta: [
  96. {elem: "SYSTEM", cmd: "Nop", amt: 5, },
  97. {elem: "Buffer", cmd: "ScrollColsH", amt: 5, },
  98. {elem: "Buffer", cmd: "ScrollColsH", amt: 5, },
  99. ]},
  100. // {elem: "Buffer", cmd: "InsertString", mods: "CA", key: "r", amt: " ", flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]}, // normal, printable characters
  101. {elem: "Buffer", cmd: "InsertChar", mods: "", key: "VK_Print", amt: 0, flags: ["provokeAC", "scrollToCursor", "resetCursorBlink", "rehighlight"]}, // normal, printable characters
  102. {elem: "Buffer", cmd: "InsertChar", mods: "AT", key: "n", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]}, // inserts a null character, for testing or fun
  103. {elem: "Buffer", cmd: "GoToFirstCharOfLine", mods: "", key: "XK_Home", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  104. {elem: "Buffer", cmd: "GoToLastCharOfLine", mods: "", key: "XK_End", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  105. {elem: "Buffer", cmd: "GrowSelectionH", mods: "S", key: "XK_Left", amt: -1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  106. {elem: "Buffer", cmd: "GrowSelectionH", mods: "S", key: "XK_Right", amt: 1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  107. {elem: "Buffer", cmd: "GrowSelectionV", mods: "S", key: "XK_Up", amt: -1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  108. {elem: "Buffer", cmd: "GrowSelectionV", mods: "S", key: "XK_Down", amt: 1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  109. {elem: "Buffer", cmd: "GrowSelectionV", mods: "CS", key: "XK_Up", amt: -1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  110. {elem: "Buffer", cmd: "GrowSelectionV", mods: "CS", key: "XK_Down", amt: 1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  111. {elem: "Buffer", cmd: "ClearSelection", mods: "", key: "XK_Escape", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  112. {elem: "Buffer", cmd: "PushCursor", mods: "A", key: "c", amt: 0, flags: []},
  113. {elem: "Buffer", cmd: "Indent", mods: "", key: "XK_Tab", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  114. {elem: "Buffer", cmd: "GrowSelectionToSOL", mods: "S", key: "XK_Home", amt: 0, },
  115. {elem: "Buffer", cmd: "GrowSelectionToEOL", mods: "S", key: "XK_End", amt: 0, },
  116. {elem: "Buffer", cmd: "Unindent", mods: "S", key: "XK_Tab", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  117. {elem: "Buffer", cmd: "Unindent", mods: "S", key: "XK_ISO_Left_Tab", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  118. //{elem: "Buffer", cmd: "LinePrependText", mods: "CAST", key: "XK_F1", amt: "//", flags: ["rehighlight", "undoSeqBreak"]},
  119. //{elem: "Buffer", cmd: "SurroundSelection", mods: "CAST", key: "XK_F1", amt: ["/*", "*/"], flags: ["rehighlight", "undoSeqBreak"]},
  120. {elem: "Buffer", cmd: "ReplaceLineWithSelectionTransform", mods: "AT", key: "s",
  121. amt: ["%s", "%c", "typedef struct %s {\n\t%c\n} %s;"], flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  122. {elem: "Buffer", cmd: "LineEnsureEnding", mods: "C", key: ";", amt: ";", flags: ["rehighlight", "undoSeqBreak"]},
  123. {elem: "Buffer", cmd: "LineEnsureEnding", mods: "C", key: "{", amt: "{", flags: ["rehighlight", "undoSeqBreak"]},
  124. {elem: "Buffer", cmd: "SmartBubbleSelection", mods: "CS", key: "p", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", },
  125. {elem: "Buffer", cmd: "SmartComment", mods: "C", key: "d", amt: ["//", "/*", "*/"], flags: ["rehighlight", "undoSeqBreak"]},
  126. {elem: "Buffer", cmd: "StrictUncomment", mods: "CS", key: "d", amt: ["//", "/*", "*/"], flags: ["rehighlight", "undoSeqBreak"]},
  127. {elem: "Buffer", cmd: "DeleteCurLine", mods: "C", key: "k", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  128. {elem: "Buffer", cmd: "DuplicateLine", mods: "CA", key: "XK_Down", amt: 1, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  129. {elem: "Buffer", cmd: "DuplicateLine", mods: "CA", key: "XK_Up", amt: -1, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  130. {elem: "Buffer", cmd: "Cut", mods: "C", key: "x", amt: 0, flags: ["rehighlight", "undoSeqBreak"]},
  131. {elem: "Buffer", cmd: "SmartCut", mods: "CS", key: "x", amt: 0, flags: ["rehighlight", "undoSeqBreak"]},
  132. {elem: "Buffer", cmd: "Copy", mods: "C", key: "c", amt: 0, },
  133. {elem: "Buffer", cmd: "Paste", mods: "C", key: "v", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  134. {elem: "Buffer", cmd: "Paste", mods: "S", key: "XK_Insert", amt: 2, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  135. {elem: "Buffer", cmd: "SelectAll", mods: "C", key: "a", amt: 0, },
  136. {elem: "Buffer", cmd: "SelectNone", mods: "CS", key: "a", amt: 0, },
  137. {elem: "Buffer", cmd: "SelectToEOL", mods: "C", key: "l", amt: 0, },
  138. {elem: "Buffer", cmd: "SelectFromSOL", mods: "CS", key: "l", amt: 0, },
  139. // {elem: "Buffer", cmd: "GoToLine", mods: "C", key: "g", amt: 0, flags: ["scrollToCursor", "resetCursorBlink"]},
  140. {elem: "Buffer", cmd: "GoToSOL", mods: "C", key: "XK_Home", amt: 0, flags: ["scrollToCursor", "resetCursorBlink"]},
  141. {elem: "Buffer", cmd: "GoToEOL", mods: "C", key: "XK_End", amt: 0, flags: ["scrollToCursor", "resetCursorBlink"]},
  142. {elem: "Buffer", cmd: "GoToAfterIndent", mods: "T", key: "XK_Home", amt: 0, flags: ["scrollToCursor", "resetCursorBlink"]},
  143. {elem: "Buffer", cmd: "Undo", mods: "C", key: "z", amt: 0, flags: ["scrollToCursor", "rehighlight"]},
  144. {elem: "Buffer", cmd: "Redo", mods: "CS", key: "z", amt: 0, flags: ["scrollToCursor", "rehighlight"]},
  145. {elem: "Buffer", cmd: "Save", mods: "C", key: "s", amt: 0, },
  146. {elem: "Buffer", cmd: "PromptAndClose", mods: "CS", key: "j", amt: 0, },
  147. {elem: "Buffer", cmd: "Reload", mods: "", key: "XK_F5", amt: 0, flags: ["rehighlight"]},
  148. // {elem: "Buffer", cmd: "Find", mods: "C", key: "f", amt: 0, setMode: 1 },
  149. {elem: "Buffer", cmd: "SmartFind", mods: "C", key: "f", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", setMode: 1 },
  150. {elem: "Buffer", cmd: "FindNext", mods: "", key: "XK_F3", amt: 0, setMode: 1, flags: ["scrollToCursor"]},
  151. {elem: "Buffer", cmd: "FindPrev", mods: "S", key: "XK_F3", amt: 0, setMode: 1, flags: ["scrollToCursor"]},
  152. {elem: "Buffer", cmd: "ReplaceStart", mods: "C", key: "r", amt: 0, setMode: 1, },
  153. {elem: "Buffer", cmd: "Debug", mods: "C", key: "q", amt: 0, flags: []},
  154. {elem: "Buffer", cmd: "Debug", mods: "C", key: "w", amt: 1, flags: []},
  155. {elem: "Buffer", cmd: "RehilightWholeBuffer", mods: "CS", key: "r", amt: 0, flags: ["rehighlight"]},
  156. {elem: "Buffer", cmd: "SetBookmark", mods: "CA", key: "b", amt: 0, flags: []},
  157. {elem: "Buffer", cmd: "RemoveBookmark", mods: "CS", key: "b", amt: 0, flags: []},
  158. {elem: "Buffer", cmd: "ToggleBookmark", mods: "C", key: "b", amt: 0, flags: []},
  159. {elem: "Buffer", cmd: "GoToNextBookmark", mods: "A", key: "XK_Next", amt: 0, flags: ["scrollToCursor"]},
  160. {elem: "Buffer", cmd: "GoToPrevBookmark", mods: "A", key: "XK_Prior", amt: 0, flags: ["scrollToCursor"]},
  161. {elem: "Buffer", cmd: "GoToFirstBookmark", mods: "A", key: "XK_Home", amt: 0, flags: ["scrollToCursor"]},
  162. {elem: "Buffer", cmd: "GoToLastBookmark", mods: "A", key: "XK_End", amt: 0, flags: ["scrollToCursor"]},
  163. {elem: "Buffer", cmd: "ToggleMenu", mods: "C", key: "m", amt: 0, },
  164. {elem: "Buffer", cmd: "CollapseWhitespace", mods: "A", key: "s", amt: 0, flags: ["scrollToCursor", "rehighlight", "resetCursorBlink", "undoSeqBreak"]},
  165. {elem: "Buffer", cmd: "SelectSequenceUnder", mods: "C", key: "p", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["resetCursorBlink"]},
  166. {elem: "Buffer", cmd: "MoveToNextSequence", mods: "C", key: "XK_Right", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink"]},
  167. {elem: "Buffer", cmd: "MoveToPrevSequence", mods: "C", key: "XK_Left", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink"]},
  168. {elem: "Buffer", cmd: "DeleteToNextSequence", mods: "C", key: "XK_Delete", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink", "rehighlight", "undoSeqBreak"]},
  169. {elem: "Buffer", cmd: "DeleteToPrevSequence", mods: "C", key: "XK_BackSpace", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink", "rehighlight", "undoSeqBreak"]},
  170. {elem: "Buffer", cmd: "GrowSelectionToNextSequence", mods: "CS", key: "XK_Right", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink"]},
  171. {elem: "Buffer", cmd: "GrowSelectionToPrevSequence", mods: "CS", key: "XK_Left", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", flags: ["scrollToCursor", "resetCursorBlink"]},
  172. {elem: "Buffer", cmd: "FindStartSequenceUnderCursor", mods: "CS", key: "f", amt: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", setMode: 1, flags: []},
  173. {elem: "Buffer", cmd: "PrependToSequence", mods: "C", key: "8", amt: [".->abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", "*"], flags: ["rehighlight", "resetCursorBlink", "undoSeqBreak"]},
  174. {elem: "Buffer", cmd: "PrependToSequence", mods: "C", key: "7", amt: [".->abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", "&"], flags: ["rehighlight", "resetCursorBlink", "undoSeqBreak"]},
  175. {elem: "Buffer", cmd: "SurroundSequence", mods: "C", key: "9", amt: [".->abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", "(", ")"], flags: ["rehighlight", "resetCursorBlink", "undoSeqBreak"]},
  176. {elem: "Buffer", cmd: "SurroundSequence", mods: "C", key: "0", amt: [".->abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", "(", ")"], flags: ["rehighlight", "resetCursorBlink", "undoSeqBreak"]},
  177. {elem: "Buffer", cmd: "PrintACDict", mods: "CT", key: "d", flags: []},
  178. {elem: "Buffer", cmd: "ACProvoke", mods: "C", key: "XK_space", flags: []},
  179. {mode: 10, elem: "Buffer", cmd: "ACMoveCursor", mods: "C", key: "XK_Down", amt: 1, flags: []},
  180. {mode: 10, elem: "Buffer", cmd: "ACMoveCursor", mods: "C", key: "XK_Up", amt: -1, flags: []},
  181. {mode: 10, elem: "Buffer", cmd: "ACReplaceWithSelected", mods: "C", key: "XK_Return", flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  182. {mode: 10, elem: "Buffer", cmd: "ACCompletePrefix", mods: "C", key: "XK_Tab", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  183. {mode: 10, elem: "Buffer", cmd: "ACCompletePrefix", mods: "C", key: "XK_ISO_Left_Tab", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  184. {mode: 10, elem: "Buffer", cmd: "ACCancel", mods: "", key: "XK_Escape", flags: []},
  185. {mode: 11, elem: "Buffer", cmd: "ACMoveCursor", mods: "", key: "XK_Down", amt: 1, flags: []},
  186. {mode: 11, elem: "Buffer", cmd: "ACMoveCursor", mods: "", key: "XK_Up", amt: -1, flags: []},
  187. {mode: 11, elem: "Buffer", cmd: "ACMoveCursor", mods: "C", key: "XK_Down", amt: 1, flags: []},
  188. {mode: 11, elem: "Buffer", cmd: "ACMoveCursor", mods: "C", key: "XK_Up", amt: -1, flags: []},
  189. {mode: 11, elem: "Buffer", cmd: "ACReplaceWithSelected", mods: "", key: "XK_Return", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  190. {mode: 11, elem: "Buffer", cmd: "ACReplaceWithSelected", mods: "C", key: "XK_Return", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  191. {mode: 11, elem: "Buffer", cmd: "ACCompletePrefix", mods: "", key: "XK_Tab", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  192. {mode: 11, elem: "Buffer", cmd: "ACCompletePrefix", mods: "C", key: "XK_Tab", amt: 0, flags: ["rehighlight", "undoSeqBreak", "resetCursorBlink"]},
  193. {mode: 11, elem: "Buffer", cmd: "ACCancel", mods: "", key: "XK_Escape", flags: []},
  194. {elem: "Buffer", cmd: "MacroToggleRecording", mods: "T", key: "r"},
  195. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "1", amt: 0},
  196. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "2", amt: 1},
  197. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "3", amt: 2},
  198. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "4", amt: 3},
  199. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "5", amt: 4},
  200. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "6", amt: 5},
  201. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "7", amt: 6},
  202. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "8", amt: 7},
  203. {elem: "Buffer", cmd: "MacroReplay", mods: "T", key: "9", amt: 8},
  204. {mode: 1, elem: "Buffer", cmd: "FindNext", mods: "", key: "XK_F3", amt: 0, flags: ["centerOnCursor"]},
  205. {mode: 1, elem: "Buffer", cmd: "FindPrev", mods: "S", key: "XK_F3", amt: 0, flags: ["centerOnCursor"]},
  206. {mode: 1, elem: "Buffer", cmd: "FindStop", mods: "", key: "XK_Escape", amt: 0, clearMode: 1, },
  207. {mode: 1, elem: "Buffer", cmd: "ReplaceStart", mods: "C", key: "r", amt: 0, flags: ["centerOnCursor"]},
  208. {mode: 1, elem: "Buffer", cmd: "ReplaceNext", mods: "A", key: "r", amt: 0, flags: ["centerOnCursor", "rehighlight", "undoSeqBreak"]},
  209. {mode: 1, elem: "Buffer", cmd: "ReplaceAll", mods: "A", key: "a", amt: 0, flags: ["centerOnCursor", "rehighlight", "undoSeqBreak"]},
  210. {mode: 0, elem: "Buffer", cmd: "GoToLineLaunch", mods: "C", key: "g", amt: 0, setMode: "goto", flags: ["resetCursorBlink"]},
  211. {mode: "goto", elem: "Buffer", cmd: "GoToLineSubmit", mods: "", key: "XK_Return", amt: 0, clearMode: "goto", flags: ["centerOnCursor", "resetCursorBlink"]},
  212. {mode: "goto", elem: "Buffer", cmd: "GoToLineCancel", mods: "", key: "XK_Escape", amt: 0, clearMode: "goto", flags: []},
  213. {mode: "goto", elem: "Buffer", cmd: "GoToLineCancel", mods: "C", key: "g", amt: 0, clearMode: "goto", flags: []},
  214. // vim mode
  215. {mode: 0, elem: "Buffer", cmd: "SetMode", mods: "T", key: "v", amt: 666}, // vim command mode
  216. {mode: 666, elem: "Buffer", cmd: "SetMode", mods: "T", key: "v", amt: 0}, // back to normal mode
  217. {mode: 667, elem: "Buffer", cmd: "SetMode", mods: "T", key: "v", amt: 0}, // back to normal mode
  218. {mode: 667, elem: "Buffer", cmd: "SetMode", mods: "", key: "XK_Escape", amt: 666}, // insert -> cmd
  219. {mode: 668, elem: "Buffer", cmd: "SetMode", mods: "", key: "XK_Escape", amt: 666}, // replace -> cmd
  220. {mode: 669, elem: "Buffer", cmd: "SetMode", mods: "", key: "XK_Escape", amt: 666}, // visual -> cmd
  221. {mode: 666, elem: "Buffer", cmd: "SetMode", mods: "", key: "i", amt: 667}, // cmd -> insert
  222. {mode: 666, elem: "Buffer", cmd: "SetMode", mods: "S", key: "r", amt: 668}, // cmd -> replace
  223. {mode: 666, elem: "Buffer", cmd: "SetMode", mods: "", key: "v", amt: 669}, // cmd -> visual
  224. {mode: 666, cmd_list: [ // vim "normal" command mode
  225. {elem: "Buffer", cmd: "MoveCursorH", mods: "", key: "h", amt: -1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  226. {elem: "Buffer", cmd: "MoveCursorH", mods: "", key: "l", amt: 1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  227. {elem: "Buffer", cmd: "MoveCursorV", mods: "", key: "k", amt: -1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  228. {elem: "Buffer", cmd: "MoveCursorV", mods: "", key: "j", amt: 1, flags: ["scrollToCursor", "resetCursorBlink", "undoSeqBreak"]},
  229. {elem: "Buffer", cmd: "Backspace", mods: "S", key: "x", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]},
  230. {elem: "Buffer", cmd: "Delete", mods: "", key: "x", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]},
  231. {elem: "Buffer", cmd: "Undo", mods: "", key: "u", amt: 0, flags: ["scrollToCursor", "rehighlight"]},
  232. {elem: "Buffer", cmd: "Indent", mods: "", key: ">", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  233. {elem: "Buffer", cmd: "Unindent", mods: "", key: "<", amt: 0, flags: ["scrollToCursor", "rehighlight", "undoSeqBreak"]},
  234. ]},
  235. {mode: 667, cmd_list: [ // vim insert mode
  236. {elem: "Buffer", cmd: "InsertChar", mods: "", key: "VK_Print", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]}, // normal, printable characters
  237. ]},
  238. {mode: 668, cmd_list: [ // vim replace (overwrite) mode
  239. {elem: "Buffer", cmd: "OverwriteChar", mods: "", key: "VK_Print", amt: 0, flags: ["scrollToCursor", "resetCursorBlink", "rehighlight"]}, // normal, printable characters
  240. ]},
  241. {elem: "Hexedit", cmd: "MoveCursorH", mods: "", key: "XK_Left", amt: -1},
  242. {elem: "Hexedit", cmd: "MoveCursorH", mods: "", key: "XK_Right", amt: 1},
  243. {elem: "Hexedit", cmd: "MoveCursorV", mods: "", key: "XK_Up", amt: -1},
  244. {elem: "Hexedit", cmd: "MoveCursorV", mods: "", key: "XK_Down", amt: 1},
  245. {elem: "Hexedit", cmd: "ScrollV", mods: "", key: "XK_Prior", amt: -8},
  246. {elem: "Hexedit", cmd: "ScrollV", mods: "", key: "XK_Next", amt: 8},
  247. {elem: "FileBrowser", cmd: "MoveCursorV", mods: "", key: "XK_Up", amt: -1, flags: []},
  248. {elem: "FileBrowser", cmd: "MoveCursorV", mods: "", key: "XK_Down", amt: 1, flags: []},
  249. // {elem: "FileViewer", cmd: "MoveCursorV", mods: "", key: "RAT_1", amt: 1, flags: []},
  250. {elem: "FileBrowser", cmd: "ParentDir", mods: "", key: "XK_BackSpace", amt: 0, flags: []},
  251. {elem: "FileBrowser", cmd: "ToggleSelect", mods: "", key: "XK_space", amt: 0, flags: []},
  252. {elem: "FileBrowser", cmd: "SmartOpen", mods: "", key: "XK_Return", amt: 0, flags: []},
  253. {elem: "FileBrowser", sub_elem: "FileRow" cmd: "ToggleSelect", mods: "", key: "RAT_1", amt: 0, flags: []},
  254. {elem: "FileBrowser", sub_elem: "FileRow" cmd: "SmartOpen", mods: "", key: "RAT_1x2", amt: 0, flags: []},
  255. ],
  256. },
  257. }