X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fhelp%2Fhelp.md;h=694312606c2c82a9177afe2672f19c2966aba022;hb=ee9f2a3d9ce5dcda316dbcf2f77cfe346a5c1d86;hp=7961b5e47254aaf48e77cbd1e8d15fe0bb219ce5;hpb=3da2a870b67bb65ed79c6ef174b0741fa1c04620;p=micro.git diff --git a/runtime/help/help.md b/runtime/help/help.md index 7961b5e4..69431260 100644 --- a/runtime/help/help.md +++ b/runtime/help/help.md @@ -21,15 +21,10 @@ You can move the cursor around with the arrow keys and mouse. These are the default keybindings, along with their actions. -#### Editor bindings - * Ctrl-q: Quit * Ctrl-e: Execute a command * Ctrl-g: Toggle help text * Ctrl-b: Run a shell command - -#### Buffer bindings - * Ctrl-s: Save * Ctrl-o: Open file * Ctrl-z: Undo @@ -55,7 +50,7 @@ ctrl up and down move the cursor the start and end of the buffer. You can hold shift with all of these movement actions to select while moving. -The buffer bindings may be rebound using the `~/.config/micro/bindings.json` +The bindings may be rebound using the `~/.config/micro/bindings.json` file. Each key is bound to an action. For example, to bind `Ctrl-y` to undo and `Ctrl-z` to redo, you could put the @@ -72,52 +67,64 @@ Here are the defaults: ```json { - "Up": "CursorUp", - "Down": "CursorDown", - "Right": "CursorRight", - "Left": "CursorLeft", - "ShiftUp": "SelectUp", - "ShiftDown": "SelectDown", - "ShiftLeft": "SelectLeft", - "ShiftRight": "SelectRight", - "AltLeft": "WordLeft", - "AltRight": "WordRight", - "AltShiftRight": "SelectWordRight", - "AltShiftLeft": "SelectWordLeft", - "CtrlLeft": "StartOfLine", - "CtrlRight": "EndOfLine", - "CtrlShiftLeft": "SelectToStartOfLine", - "CtrlShiftRight": "SelectToEndOfLine", - "CtrlUp": "CursorStart", - "CtrlDown": "CursorEnd", - "CtrlShiftUp": "SelectToStart", - "CtrlShiftDown": "SelectToEnd", - "Enter": "InsertEnter", - "Space": "InsertSpace", - "Backspace": "Backspace", - "Backspace2": "Backspace", - "Tab": "InsertTab", - "CtrlO": "OpenFile", - "CtrlS": "Save", - "CtrlF": "Find", - "CtrlN": "FindNext", - "CtrlP": "FindPrevious", - "CtrlZ": "Undo", - "CtrlY": "Redo", - "CtrlC": "Copy", - "CtrlX": "Cut", - "CtrlK": "CutLine", - "CtrlD": "DuplicateLine", - "CtrlV": "Paste", - "CtrlA": "SelectAll", - "Home": "Start", - "End": "End", - "PgUp": "PageUp", - "PgDn": "PageDown", - "CtrlU": "HalfPageUp", - "CtrlD": "HalfPageDown", - "CtrlR": "ToggleRuler", - "Delete": "Delete" + "Up": "CursorUp", + "Down": "CursorDown", + "Right": "CursorRight", + "Left": "CursorLeft", + "ShiftUp": "SelectUp", + "ShiftDown": "SelectDown", + "ShiftLeft": "SelectLeft", + "ShiftRight": "SelectRight", + "AltLeft": "WordLeft", + "AltRight": "WordRight", + "AltShiftRight": "SelectWordRight", + "AltShiftLeft": "SelectWordLeft", + "CtrlLeft": "StartOfLine", + "CtrlRight": "EndOfLine", + "CtrlShiftLeft": "SelectToStartOfLine", + "CtrlShiftRight": "SelectToEndOfLine", + "CtrlUp": "CursorStart", + "CtrlDown": "CursorEnd", + "CtrlShiftUp": "SelectToStart", + "CtrlShiftDown": "SelectToEnd", + "Enter": "InsertEnter", + "Space": "InsertSpace", + "Backspace": "Backspace", + "Backspace2": "Backspace", + "Tab": "InsertTab", + "CtrlO": "OpenFile", + "CtrlS": "Save", + "CtrlF": "Find", + "CtrlN": "FindNext", + "CtrlP": "FindPrevious", + "CtrlZ": "Undo", + "CtrlY": "Redo", + "CtrlC": "Copy", + "CtrlX": "Cut", + "CtrlK": "CutLine", + "CtrlD": "DuplicateLine", + "CtrlV": "Paste", + "CtrlA": "SelectAll", + "Home": "Start", + "End": "End", + "PgUp": "PageUp", + "PgDn": "PageDown", + "CtrlG": "ToggleHelp", + "CtrlR": "ToggleRuler", + "CtrlL": "JumpLine", + "Delete": "Delete", + "Esc": "ClearStatus", + "CtrlB": "ShellMode", + "CtrlQ": "Quit", + "CtrlE": "CommandMode", + + // Emacs-style keybindings + "Alt-f": "WordRight", + "Alt-b": "WordLeft", + "Alt-a": "StartOfLine", + "Alt-e": "EndOfLine", + "Alt-p": "CursorUp", + "Alt-n": "CursorDown", } ``` @@ -203,19 +210,25 @@ Here are the options that you can set: default value: `on` -* `undothreshold`: maximum time in milliseconds events can be apart to be counted as a single undo - - default value: `500` - * `statusline`: display the status line at the bottom of the screen default value: `on` +* `savecursor`: remember where the cursor was last time the file was opened and + put it there when you open the file again + + default value: `off` + +* `saveundo`: when this option is on, undo is saved even after you close a file + so if you close and reopen a file, you can keep undoing + + default value: `off` + * `scrollmargin`: amount of lines you would like to see above and below the cursor default value: `3` -* `scrollspeed`: amount of lines to scroll +* `scrollspeed`: amount of lines to scroll for one scroll event default value: `2`