X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fhelp%2Fdefaultkeys.md;h=7e25c918ad6e87ec5565bdb7c4dc7b0919148989;hb=98ddb62af48156a5aae0b4068bbfc39b992bec91;hp=5df54e2431297138f07ff2a1be4a8573a27913bf;hpb=c29e58e3d4c0d816e961b68af12f21d0570c5806;p=micro.git diff --git a/runtime/help/defaultkeys.md b/runtime/help/defaultkeys.md index 5df54e24..7e25c918 100644 --- a/runtime/help/defaultkeys.md +++ b/runtime/help/defaultkeys.md @@ -1,141 +1,131 @@ -#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 | +| Home or Ctrl+LeftArrow | Move to the beginning of the current line | +| End or Ctrl+RightArrow | Move to the end of the current line | +| Alt+LeftArrow | Move cursor one word left | +| Alt+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 | +|------------------------------------ |------------------------------------------ | +| Alt+Shift+RightArrow | Select word right | +| Alt+Shift+LeftArrow | Select word left | +| Shift+Home or Ctrl+Shift+LeftArrow | Select to start of current line | +| Shift+End or Ctrl+Shift+RightArrow | 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 of 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) | +| AltShiftUp | Spawn a new cursor on the line above the current one | +| AltShiftDown | 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 |