]> git.lizzy.rs Git - micro.git/blobdiff - runtime/help/defaultkeys.md
Fix repo.json info in plugin docs (#2313)
[micro.git] / runtime / help / defaultkeys.md
index 5df54e2431297138f07ff2a1be4a8573a27913bf..b724ab5632a7e596bf9767c396d63395d6ab73ca 100644 (file)
-#Default Keys
-
-Below are simple charts of the default hotkeys and their functions.
-For more information about binding custom hotkeys or changing
-default bindings, please run `>help keybindings`
-
-Please remember that *all* keys here are rebindable!
-If you don't like it, you can change it!
-
-(We are not responsible for you forgetting what you bind keys to.
- Do not open an issue because you forgot your keybindings.)
-
-#Power user
-+--------+---------------------------------------------------------+
-| Ctrl+E | Switch to the micro command prompt to run a command.    |
-|        | (See `>help commands` for a list of commands. )         |
-+--------+---------------------------------------------------------+
-| Ctrl+B | Run shell commands in micro's current working directory.|
-+--------+---------------------------------------------------------+
-
-#Navigation
-
-+--------+---------------------------------------------------------+
-| Key    | Description of function                                 |
-|--------+---------------------------------------------------------+
-| Arrows | Move the cursor around your current document.           |
-|        | (Yes this is rebindable to the vim keys if you want.)   |
-+--------+---------------------------------------------------------+
-| Shift+ | Move and select text.                                   |
-| Arrows |                                                         |
-+--------+---------------------------------------------------------+
-| Home   | Move to the beginning of the current line. (Naturally.) |
-+--------+---------------------------------------------------------+
-| End    | Move to the end of the current line.                    |
-+--------+---------------------------------------------------------+
-| PageUp | Move cursor up lines quickly.                           |
-+--------+---------------------------------------------------------+
-| PageDn | Move cursor down lines quickly.                         |
-+--------+---------------------------------------------------------+
-| Ctrl+L | Jump to line in current file. ( Prompts for line # )    |
-+--------+---------------------------------------------------------+
-| Ctrl+W | Move between splits open in current tab.                |
-|        | (See vsplit and hsplit in `>help commands`)             |
-+--------+---------------------------------------------------------+
-| Ctrl+T | Open a new tab.                                         |
-+--------+---------------------------------------------------------+
-| Alt+,  | Move to the previous tab in the tablist.                |
-|        | (This works like moving between file buffers in nano)   |
-+--------+---------------------------------------------------------+
-| Alt+.  | Move to the next tab in the tablist.                    |
-+--------+---------------------------------------------------------+
-
-#Find Operations
-
-+--------+---------------------------------------------------------+
-| Ctrl+F | Find text in current file. ( Prompts for text to find.) |
-+--------+---------------------------------------------------------+
-| Ctrl+N | Find next instance of current search in current file.   |
-+--------+---------------------------------------------------------+
-| Ctrl+P | Find prev instance of current search in current file.   |
-+--------+---------------------------------------------------------+
-
-#File Operations
-
-+--------+---------------------------------------------------------+
-| Ctrl+Q | Close current file. ( Quits micro if last file open. )  |
-+--------+---------------------------------------------------------+
-| Ctrl+O | Open a file. ( Prompts you to input filename. )         |
-+--------+---------------------------------------------------------+
-| Ctrl+S | Save current file.                                      |
-+--------+---------------------------------------------------------+
-
-#Text operations
-
-+--------+---------------------------------------------------------+
-| Ctrl+A | Select all text in current file.                        |
-+--------+---------------------------------------------------------+
-| Ctrl+X | Cut selected text.                                      |
-+--------+---------------------------------------------------------+
-| Ctrl+C | Copy selected text.                                     |
-+--------+---------------------------------------------------------+
-| Ctrl+V | Paste selected text.                                    |
-+--------+---------------------------------------------------------+
-| Ctrl+K | Cut current line. ( Can then be pasted with Ctrl+V)     |
-+--------+---------------------------------------------------------+
-| Ctrl+D | Duplicate current line.                                 |
-+--------+---------------------------------------------------------+
-| Ctrl+Z | Undo actions.                                           |
-+--------+---------------------------------------------------------+
-| Ctrl+Y | Redo actions.                                           |
-+--------+---------------------------------------------------------+
-
-#Other
-+--------+---------------------------------------------------------+
-| Ctrl+G | Open the help file.                                     |
-+--------+---------------------------------------------------------+
-| Ctrl+H | Alternate backspace.                                    |
-|        | (Some old terminals don't support the Backspace key .)  |
-+--------+---------------------------------------------------------+
-| Ctrl+R | Toggle the line number ruler. ( On the lefthand side.)  |
-+--------+---------------------------------------------------------+
-
-#Emacs style actions
-
-+--------+---------------------------------------------------------+
-| Alt+F  | Move to the end of the next word. (To the next space.)  |
-+--------+---------------------------------------------------------+
-| Alt+B  | Move to the beginning of the previous word.             |
-+--------+---------------------------------------------------------+
-| Alt+A  | Alternate Home key. ( Move to beginning of line. )      |
-+--------+---------------------------------------------------------+
-| Alt+E  | Alternate End key. ( Move to the end of line.)          |
-+--------+---------------------------------------------------------+
-| Alt+P  | Move cursor up. ( Same as up key. )                     |
-+--------+---------------------------------------------------------+
-| Alt+N  | Move cursor down. ( Same as down key. )                 |
-+--------+---------------------------------------------------------+
-
-#Function keys.
+# Default Keys
+
+Below are simple charts of the default hotkeys and their functions. For more
+information about binding custom hotkeys or changing default bindings, please
+run `> help keybindings`
+
+Please remember that *all* keys here are rebindable! If you don't like it, you
+can change it!
+
+### Power user
+
+| Key       | Description of function                                                                           |
+|---------- |-------------------------------------------------------------------------------------------------- |
+| Ctrl-e    | Open a command prompt for running commands (see `> help commands` for a list of valid commands).  |
+| Tab       | In command prompt, it will autocomplete if possible.                                              |
+| Ctrl-b    | Run a shell command (this will close micro while your command executes).                          |
+
+### Navigation
+
+| Key                         | Description of function                                                                   |
+|---------------------------- |------------------------------------------------------------------------------------------ |
+| Arrows                      | Move the cursor around                                                                    |
+| Shift-arrows                | Move and select text                                                                      |
+| Alt(Ctrl on Mac)-LeftArrow  | Move to the beginning of the current line                                                 |
+| Alt(Ctrl on Mac)-RightArrow | Move to the end of the current line                                                       |
+| Home                        | Move to the beginning of text on the current line                                                 |
+| End                         | Move to the end of the current line                                                       |
+| Ctrl(Alt on Mac)-LeftArrow  | Move cursor one word left                                                                 |
+| Ctrl(Alt on Mac)-RightArrow | Move cursor one word right                                                                |
+| Alt-{                       | Move cursor to previous empty line, or beginning of document                              |
+| Alt-}                       | Move cursor to next empty line, or end of document                                        |
+| PageUp                      | Move cursor up one page                                                                   |
+| PageDown                    | Move cursor down one page                                                                 |
+| Ctrl-Home or Ctrl-UpArrow   | Move cursor to start of document                                                          |
+| Ctrl-End or Ctrl-DownArrow  | Move cursor to end of document                                                            |
+| Ctrl-l                      | Jump to a line in the file (prompts with #)                                               |
+| Ctrl-w                      | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split)  |
+
+### Tabs
+
+| Key     | Description of function   |
+|-------- |-------------------------  |
+| Ctrl-t  | Open a new tab            |
+| Alt-,   | Previous tab              |
+| Alt-.   | Next tab                  |
+
+### Find Operations
+
+| Key       | Description of function                   |
+|---------- |------------------------------------------ |
+| Ctrl-f    | Find (opens prompt)                       |
+| Ctrl-n    | Find next instance of current search      |
+| Ctrl-p    | Find previous instance of current search  |
+
+### File Operations
+
+| Key       | Description of function                                           |
+|---------- |------------------------------------------------------------------ |
+| Ctrl-q    | Close current file (quits micro if this is the last file open)    |
+| Ctrl-o    | Open a file (prompts for filename)                                |
+| Ctrl-s    | Save current file                                                 |
+
+### Text operations
+
+| Key                                 | Description of function                   |
+|------------------------------------ |------------------------------------------ |
+| Ctrl(Alt on Mac)-Shift-RightArrow   | Select word right                         |
+| Ctrl(Alt on Mac)-Shift-LeftArrow    | Select word left                          |
+| Alt(Ctrl on Mac)-Shift-LeftArrow    | Select to start of current line           |
+| Alt(Ctrl on Mac)-Shift-RightArrow   | Select to end of current line             |
+| Shift-Home                          | Select to start of current line           |
+| Shift-End                           | Select to end of current line             |
+| Ctrl-Shift-UpArrow                  | Select to start of file                   |
+| Ctrl-Shift-DownArrow                | Select to end of file                     |
+| Ctrl-x                              | Cut selected text                         |
+| Ctrl-c                              | Copy selected text                        |
+| Ctrl-v                              | Paste                                     |
+| Ctrl-k                              | Cut current line                          |
+| Ctrl-d                              | Duplicate current line                    |
+| Ctrl-z                              | Undo                                      |
+| Ctrl-y                              | Redo                                      |
+| Alt-UpArrow                         | Move current line or selected lines up    |
+| Alt-DownArrow                       | Move current line or selected lines down  |
+| Alt-Backspace or Alt-Ctrl-h         | Delete word left                          |
+| Ctrl-a                              | Select all                                |
+
+### Macros
+
+| Key       | Description of function                                                           |
+|---------- |---------------------------------------------------------------------------------- |
+| Ctrl-u    | Toggle macro recording (press Ctrl-u to start recording and press again to stop)  |
+| Ctrl-j    | Run latest recorded macro                                                         |
+
+### Multiple cursors
+
+| Key               | Description of function                                                                       |
+|------------------ |---------------------------------------------------------------------------------------------- |
+| Alt-n             | Create new multiple cursor from selection (will select current word if no current selection)  |
+| Alt-Shift-Up      | Spawn a new cursor on the line above the current one                                          |
+| Alt-Shift-Down    | Spawn a new cursor on the line below the current one                                          |
+| 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
+
+| Key       | Description of function                                                               |
+|---------- |-------------------------------------------------------------------------------------- |
+| Ctrl-g    | Open help file                                                                        |
+| Ctrl-h    | Backspace (old terminals do not support the backspace key and use Ctrl+H instead)     |
+| Ctrl-r    | Toggle the line number ruler                                                          |
+
+### Emacs style actions
+
+| Key       | Description of function   |
+|---------- |-------------------------- |
+| Alt-f     | Next word                 |
+| Alt-b     | Previous word             |
+| Alt-a     | Move to start of line     |
+| Alt-e     | Move to end of line       |
+
+### Function keys.
 
 Warning! The function keys may not work in all terminals! 
-+--------+---------------------------------------------------------+
-| F1     | Open help.                                              |
-+--------+---------------------------------------------------------+
-| F2     | Save current file.                                      |
-+--------+---------------------------------------------------------+
-| F3     | Find in current file. ( Same as Ctrl+F )                |
-+--------+---------------------------------------------------------+
-| F4     | Close current file. (Quit if only file.)                |
-+--------+---------------------------------------------------------+
-| F7     | Find in current file. (Same as Ctrl+F)                  |
-+--------+---------------------------------------------------------+
-| F10    | Close current file.                                     |
-+--------+---------------------------------------------------------+
-
-#Macros
-
-Micro supports the use of keyboard macros. Simply press Ctrl+U to
-begin recording a macro and press Ctrl+U to stop recording.
-
-Press Ctrl+J to run your recorded macro. 
\ No newline at end of file
+
+| Key   | Description of function   |
+|------ |-------------------------- |
+| F1    | Open help                 |
+| F2    | Save                      |
+| F3    | Find                      |
+| F4    | Quit                      |
+| F7    | Find                      |
+| F10   | Quit                      |