You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
3.3 KiB

  1. ## Readline Shortcut
  2. `Meta`+`B` means press `Esc` and `n` separately.
  3. Users can change that in terminal simulator(i.e. iTerm2) to `Alt`+`B`
  4. Notice: `Meta`+`B` is equals with `Alt`+`B` in windows.
  5. * Shortcut in normal mode
  6. | Shortcut | Comment |
  7. | ------------------ | --------------------------------- |
  8. | `Ctrl`+`A` | Beginning of line |
  9. | `Ctrl`+`B` / `←` | Backward one character |
  10. | `Meta`+`B` | Backward one word |
  11. | `Ctrl`+`C` | Send io.EOF |
  12. | `Ctrl`+`D` | Delete one character |
  13. | `Meta`+`D` | Delete one word |
  14. | `Ctrl`+`E` | End of line |
  15. | `Ctrl`+`F` / `→` | Forward one character |
  16. | `Meta`+`F` | Forward one word |
  17. | `Ctrl`+`G` | Cancel |
  18. | `Ctrl`+`H` | Delete previous character |
  19. | `Ctrl`+`I` / `Tab` | Command line completion |
  20. | `Ctrl`+`J` | Line feed |
  21. | `Ctrl`+`K` | Cut text to the end of line |
  22. | `Ctrl`+`L` | Clear screen |
  23. | `Ctrl`+`M` | Same as Enter key |
  24. | `Ctrl`+`N` / `↓` | Next line (in history) |
  25. | `Ctrl`+`P` / `↑` | Prev line (in history) |
  26. | `Ctrl`+`R` | Search backwards in history |
  27. | `Ctrl`+`S` | Search forwards in history |
  28. | `Ctrl`+`T` | Transpose characters |
  29. | `Meta`+`T` | Transpose words (TODO) |
  30. | `Ctrl`+`U` | Cut text to the beginning of line |
  31. | `Ctrl`+`W` | Cut previous word |
  32. | `Backspace` | Delete previous character |
  33. | `Meta`+`Backspace` | Cut previous word |
  34. | `Enter` | Line feed |
  35. * Shortcut in Search Mode (`Ctrl`+`S` or `Ctrl`+`r` to enter this mode)
  36. | Shortcut | Comment |
  37. | ----------------------- | --------------------------------------- |
  38. | `Ctrl`+`S` | Search forwards in history |
  39. | `Ctrl`+`R` | Search backwards in history |
  40. | `Ctrl`+`C` / `Ctrl`+`G` | Exit Search Mode and revert the history |
  41. | `Backspace` | Delete previous character |
  42. | Other | Exit Search Mode |
  43. * Shortcut in Complete Select Mode (double `Tab` to enter this mode)
  44. | Shortcut | Comment |
  45. | ----------------------- | ---------------------------------------- |
  46. | `Ctrl`+`F` | Move Forward |
  47. | `Ctrl`+`B` | Move Backward |
  48. | `Ctrl`+`N` | Move to next line |
  49. | `Ctrl`+`P` | Move to previous line |
  50. | `Ctrl`+`A` | Move to the first candicate in current line |
  51. | `Ctrl`+`E` | Move to the last candicate in current line |
  52. | `Tab` / `Enter` | Use the word on cursor to complete |
  53. | `Ctrl`+`C` / `Ctrl`+`G` | Exit Complete Select Mode |
  54. | Other | Exit Complete Select Mode |