]> git.lizzy.rs Git - micro.git/commitdiff
Add docs for SpawnMultiCursorSelect
authorZachary Yedidia <zyedidia@gmail.com>
Fri, 30 Mar 2018 20:42:28 +0000 (16:42 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Fri, 30 Mar 2018 20:42:28 +0000 (16:42 -0400)
cmd/micro/bindings.go
runtime/help/defaultkeys.md
runtime/help/keybindings.md

index cc24a2b3ffa1e97fcb8b76798d3f8035dfe73d7b..721226dd1c5d7f4d9cc1b3ef4795cf30600f4b44 100644 (file)
@@ -23,97 +23,97 @@ var mouseBindingActions = map[string]func(*View, bool, *tcell.EventMouse) bool{
 }
 
 var bindingActions = map[string]func(*View, bool) bool{
-       "CursorUp":              (*View).CursorUp,
-       "CursorDown":            (*View).CursorDown,
-       "CursorPageUp":          (*View).CursorPageUp,
-       "CursorPageDown":        (*View).CursorPageDown,
-       "CursorLeft":            (*View).CursorLeft,
-       "CursorRight":           (*View).CursorRight,
-       "CursorStart":           (*View).CursorStart,
-       "CursorEnd":             (*View).CursorEnd,
-       "SelectToStart":         (*View).SelectToStart,
-       "SelectToEnd":           (*View).SelectToEnd,
-       "SelectUp":              (*View).SelectUp,
-       "SelectDown":            (*View).SelectDown,
-       "SelectLeft":            (*View).SelectLeft,
-       "SelectRight":           (*View).SelectRight,
-       "WordRight":             (*View).WordRight,
-       "WordLeft":              (*View).WordLeft,
-       "SelectWordRight":       (*View).SelectWordRight,
-       "SelectWordLeft":        (*View).SelectWordLeft,
-       "DeleteWordRight":       (*View).DeleteWordRight,
-       "DeleteWordLeft":        (*View).DeleteWordLeft,
-       "SelectLine":            (*View).SelectLine,
-       "SelectToStartOfLine":   (*View).SelectToStartOfLine,
-       "SelectToEndOfLine":     (*View).SelectToEndOfLine,
-       "ParagraphPrevious":     (*View).ParagraphPrevious,
-       "ParagraphNext":         (*View).ParagraphNext,
-       "InsertNewline":         (*View).InsertNewline,
-       "InsertSpace":           (*View).InsertSpace,
-       "Backspace":             (*View).Backspace,
-       "Delete":                (*View).Delete,
-       "InsertTab":             (*View).InsertTab,
-       "Save":                  (*View).Save,
-       "SaveAll":               (*View).SaveAll,
-       "SaveAs":                (*View).SaveAs,
-       "Find":                  (*View).Find,
-       "FindNext":              (*View).FindNext,
-       "FindPrevious":          (*View).FindPrevious,
-       "Center":                (*View).Center,
-       "Undo":                  (*View).Undo,
-       "Redo":                  (*View).Redo,
-       "Copy":                  (*View).Copy,
-       "Cut":                   (*View).Cut,
-       "CutLine":               (*View).CutLine,
-       "DuplicateLine":         (*View).DuplicateLine,
-       "DeleteLine":            (*View).DeleteLine,
-       "MoveLinesUp":           (*View).MoveLinesUp,
-       "MoveLinesDown":         (*View).MoveLinesDown,
-       "IndentSelection":       (*View).IndentSelection,
-       "OutdentSelection":      (*View).OutdentSelection,
-       "OutdentLine":           (*View).OutdentLine,
-       "Paste":                 (*View).Paste,
-       "PastePrimary":          (*View).PastePrimary,
-       "SelectAll":             (*View).SelectAll,
-       "OpenFile":              (*View).OpenFile,
-       "Start":                 (*View).Start,
-       "End":                   (*View).End,
-       "PageUp":                (*View).PageUp,
-       "PageDown":              (*View).PageDown,
-       "HalfPageUp":            (*View).HalfPageUp,
-       "HalfPageDown":          (*View).HalfPageDown,
-       "StartOfLine":           (*View).StartOfLine,
-       "EndOfLine":             (*View).EndOfLine,
-       "ToggleHelp":            (*View).ToggleHelp,
-       "ToggleKeyMenu":         (*View).ToggleKeyMenu,
-       "ToggleRuler":           (*View).ToggleRuler,
-       "JumpLine":              (*View).JumpLine,
-       "ClearStatus":           (*View).ClearStatus,
-       "ShellMode":             (*View).ShellMode,
-       "CommandMode":           (*View).CommandMode,
-       "ToggleOverwriteMode":   (*View).ToggleOverwriteMode,
-       "Escape":                (*View).Escape,
-       "Quit":                  (*View).Quit,
-       "QuitAll":               (*View).QuitAll,
-       "AddTab":                (*View).AddTab,
-       "PreviousTab":           (*View).PreviousTab,
-       "NextTab":               (*View).NextTab,
-       "NextSplit":             (*View).NextSplit,
-       "PreviousSplit":         (*View).PreviousSplit,
-       "Unsplit":               (*View).Unsplit,
-       "VSplit":                (*View).VSplitBinding,
-       "HSplit":                (*View).HSplitBinding,
-       "ToggleMacro":           (*View).ToggleMacro,
-       "PlayMacro":             (*View).PlayMacro,
-       "Suspend":               (*View).Suspend,
-       "ScrollUp":              (*View).ScrollUpAction,
-       "ScrollDown":            (*View).ScrollDownAction,
-       "SpawnMultiCursor":      (*View).SpawnMultiCursor,
-       "SpawnMultiCursorSelect":(*View).SpawnMultiCursorSelect,
-       "RemoveMultiCursor":     (*View).RemoveMultiCursor,
-       "RemoveAllMultiCursors": (*View).RemoveAllMultiCursors,
-       "SkipMultiCursor":       (*View).SkipMultiCursor,
-       "JumpToMatchingBrace":   (*View).JumpToMatchingBrace,
+       "CursorUp":               (*View).CursorUp,
+       "CursorDown":             (*View).CursorDown,
+       "CursorPageUp":           (*View).CursorPageUp,
+       "CursorPageDown":         (*View).CursorPageDown,
+       "CursorLeft":             (*View).CursorLeft,
+       "CursorRight":            (*View).CursorRight,
+       "CursorStart":            (*View).CursorStart,
+       "CursorEnd":              (*View).CursorEnd,
+       "SelectToStart":          (*View).SelectToStart,
+       "SelectToEnd":            (*View).SelectToEnd,
+       "SelectUp":               (*View).SelectUp,
+       "SelectDown":             (*View).SelectDown,
+       "SelectLeft":             (*View).SelectLeft,
+       "SelectRight":            (*View).SelectRight,
+       "WordRight":              (*View).WordRight,
+       "WordLeft":               (*View).WordLeft,
+       "SelectWordRight":        (*View).SelectWordRight,
+       "SelectWordLeft":         (*View).SelectWordLeft,
+       "DeleteWordRight":        (*View).DeleteWordRight,
+       "DeleteWordLeft":         (*View).DeleteWordLeft,
+       "SelectLine":             (*View).SelectLine,
+       "SelectToStartOfLine":    (*View).SelectToStartOfLine,
+       "SelectToEndOfLine":      (*View).SelectToEndOfLine,
+       "ParagraphPrevious":      (*View).ParagraphPrevious,
+       "ParagraphNext":          (*View).ParagraphNext,
+       "InsertNewline":          (*View).InsertNewline,
+       "InsertSpace":            (*View).InsertSpace,
+       "Backspace":              (*View).Backspace,
+       "Delete":                 (*View).Delete,
+       "InsertTab":              (*View).InsertTab,
+       "Save":                   (*View).Save,
+       "SaveAll":                (*View).SaveAll,
+       "SaveAs":                 (*View).SaveAs,
+       "Find":                   (*View).Find,
+       "FindNext":               (*View).FindNext,
+       "FindPrevious":           (*View).FindPrevious,
+       "Center":                 (*View).Center,
+       "Undo":                   (*View).Undo,
+       "Redo":                   (*View).Redo,
+       "Copy":                   (*View).Copy,
+       "Cut":                    (*View).Cut,
+       "CutLine":                (*View).CutLine,
+       "DuplicateLine":          (*View).DuplicateLine,
+       "DeleteLine":             (*View).DeleteLine,
+       "MoveLinesUp":            (*View).MoveLinesUp,
+       "MoveLinesDown":          (*View).MoveLinesDown,
+       "IndentSelection":        (*View).IndentSelection,
+       "OutdentSelection":       (*View).OutdentSelection,
+       "OutdentLine":            (*View).OutdentLine,
+       "Paste":                  (*View).Paste,
+       "PastePrimary":           (*View).PastePrimary,
+       "SelectAll":              (*View).SelectAll,
+       "OpenFile":               (*View).OpenFile,
+       "Start":                  (*View).Start,
+       "End":                    (*View).End,
+       "PageUp":                 (*View).PageUp,
+       "PageDown":               (*View).PageDown,
+       "HalfPageUp":             (*View).HalfPageUp,
+       "HalfPageDown":           (*View).HalfPageDown,
+       "StartOfLine":            (*View).StartOfLine,
+       "EndOfLine":              (*View).EndOfLine,
+       "ToggleHelp":             (*View).ToggleHelp,
+       "ToggleKeyMenu":          (*View).ToggleKeyMenu,
+       "ToggleRuler":            (*View).ToggleRuler,
+       "JumpLine":               (*View).JumpLine,
+       "ClearStatus":            (*View).ClearStatus,
+       "ShellMode":              (*View).ShellMode,
+       "CommandMode":            (*View).CommandMode,
+       "ToggleOverwriteMode":    (*View).ToggleOverwriteMode,
+       "Escape":                 (*View).Escape,
+       "Quit":                   (*View).Quit,
+       "QuitAll":                (*View).QuitAll,
+       "AddTab":                 (*View).AddTab,
+       "PreviousTab":            (*View).PreviousTab,
+       "NextTab":                (*View).NextTab,
+       "NextSplit":              (*View).NextSplit,
+       "PreviousSplit":          (*View).PreviousSplit,
+       "Unsplit":                (*View).Unsplit,
+       "VSplit":                 (*View).VSplitBinding,
+       "HSplit":                 (*View).HSplitBinding,
+       "ToggleMacro":            (*View).ToggleMacro,
+       "PlayMacro":              (*View).PlayMacro,
+       "Suspend":                (*View).Suspend,
+       "ScrollUp":               (*View).ScrollUpAction,
+       "ScrollDown":             (*View).ScrollDownAction,
+       "SpawnMultiCursor":       (*View).SpawnMultiCursor,
+       "SpawnMultiCursorSelect": (*View).SpawnMultiCursorSelect,
+       "RemoveMultiCursor":      (*View).RemoveMultiCursor,
+       "RemoveAllMultiCursors":  (*View).RemoveAllMultiCursors,
+       "SkipMultiCursor":        (*View).SkipMultiCursor,
+       "JumpToMatchingBrace":    (*View).JumpToMatchingBrace,
 
        // This was changed to InsertNewline but I don't want to break backwards compatibility
        "InsertEnter": (*View).InsertNewline,
@@ -601,7 +601,7 @@ func DefaultBindings() map[string]string {
                "Ctrl-MouseLeft": "MouseMultiCursor",
 
                "Alt-n": "SpawnMultiCursor",
-               "CtrlM": "SpawnMultiCursorSelect",
+               "Alt-m": "SpawnMultiCursorSelect",
                "Alt-p": "RemoveMultiCursor",
                "Alt-c": "RemoveAllMultiCursors",
                "Alt-x": "SkipMultiCursor",
index cdff4ae9830e141e881841643287a069b8cf8671..a50f189e7f653ebc1ca774eebb68d484718c277c 100644 (file)
@@ -95,6 +95,7 @@ can change it!
 | Alt+P             | Remove latest multiple cursor                                                                 |
 | Alt+C             | Remove all multiple cursors (cancel)                                                          |
 | Alt+X             | Skip multiple cursor selection                                                                |
+| Alt+M             | Spawn a new cursor at the beginning of every line in the current selection                    |
 | Ctrl-MouseLeft    | Place a multiple cursor at any location                                                       |
 
 ### Other
index 4290cd1ee28159aba7ebb6dfeee00c2d7559431d..922b5b7ecf3217a6e68b30d032a99896a67377d4 100644 (file)
@@ -215,6 +215,7 @@ Suspend (Unix only)
 ScrollUp
 ScrollDown
 SpawnMultiCursor
+SpawnMultiCursorSelect
 RemoveMultiCursor
 RemoveAllMultiCursors
 SkipMultiCursor
@@ -464,7 +465,7 @@ MouseWheelRight
 
     // Multiple cursors bindings
     "Alt-n": "SpawnMultiCursor",
-    "CtrlM": "SpawnMultiCursorSelect",
+    "Alt-m": "SpawnMultiCursorSelect",
     "Alt-p": "RemoveMultiCursor",
     "Alt-c": "RemoveAllMultiCursors",
     "Alt-x": "SkipMultiCursor",