From 0399ecb340257cbe559237a5c0bd21fc26610e6e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 5 Jun 2020 08:07:46 -0700 Subject: [PATCH] wezterm: add docs for copy mode --- docs/SUMMARY.md | 1 + docs/changelog.markdown | 4 ++- docs/config/keys.markdown | 9 ++++++ docs/copymode.markdown | 62 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 docs/copymode.markdown diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index ee6aa79fd..af4b61146 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -15,6 +15,7 @@ - [Colors & Appearance](config/appearance.markdown) - [Lua Reference](config/lua.markdown) - [Scrollback](scrollback.markdown) +- [Copy Mode](copymode.markdown) - [Hyperlinks](hyperlinks.markdown) - [Shell Integration](shell-integration.markdown) - [iTerm Image Protocol](imgcat.markdown) diff --git a/docs/changelog.markdown b/docs/changelog.markdown index fdfe5e4ee..358102821 100644 --- a/docs/changelog.markdown +++ b/docs/changelog.markdown @@ -34,7 +34,9 @@ brief notes about them may accumulate here. You can suppress this behavior if you wish by setting `add_wsl_distributions_to_launch_menu = false`. [Read more about the launcher menuu](config/launch.html#the-launcher-menu) - +* Added `ActivateCopyMode` key assignment to put the tab into mouseless-copy + mode; [use the keyboard to define the selected text region](copymode.html). + This is bound to CTRL-SHIFT-X by default. ### 20200517-122836-92c201c6 diff --git a/docs/config/keys.markdown b/docs/config/keys.markdown index 7c5c236a3..74500985d 100644 --- a/docs/config/keys.markdown +++ b/docs/config/keys.markdown @@ -64,6 +64,9 @@ The default key bindings are: | `SUPER` | `h` | `HideApplication` (macOS only) | | `SUPER` | `k` | `ClearScrollback` | | `CTRL+SHIFT` | `K` | `ClearScrollback` | +| `SUPER` | `f` | `Search={CaseSensitiveString=""}` | +| `CTRL+SHIFT` | `F` | `Search={CaseSensitiveString=""}` | +| `CTRL+SHIFT` | `X` | `ActivateCopyMode` | ## Default Mouse Assignments @@ -661,3 +664,9 @@ return { }, } ``` + +## ActivateCopyMode + +Activates copy mode! + +[Learn more about copy mode](../copymode.html) diff --git a/docs/copymode.markdown b/docs/copymode.markdown new file mode 100644 index 000000000..2f1c94f44 --- /dev/null +++ b/docs/copymode.markdown @@ -0,0 +1,62 @@ +## Copy Mode + +Copy mode allows you to make selections using the keyboard; no need to reach +for your mouse or trackpad. + +The `ActivateCopyMode` key assignment is used to enter copy mode; it is +bound to `CTRL-SHIFT-X` by default. + +When copy mode is activated, the title is prefixed with "Copy Mode" and +the behavior of the tab is changed; keyboard input now controls the +cursor and allows moving it through the scrollback, scrolling the viewport +as needed, in a style similar to that of the Vim editor. + +Move the cursor to the start of the region you wish to select and press `v` to +toggle selection mode (it is off by default), then move the cursor to the end +of that region. You can then use `Copy` (by default: `CTRl-SHIFT-C`) to copy +that region to the clipboard. + +### Key Assignments + +The key assignments in copy mode are as follows. They are not currently +reassignable. + +| Action | Key Assignment | +|---------|-------------------| +| Exit copy mode | `Esc` | +| | `CTRL-C` | +| | `CTRL-g` | +| | `q` | +| Toggle cell selection mode | `v` | +| Move Left | `LeftArrow`| +| | `h` | +| Move Down | `DownArrow`| +| | `j` | +| Move Up | `UpArrow` | +| | `k` | +| Move Right | `RightArrow`| +| | `l` | +| Move forward one word | `Alt-RightArrow` | +| | `Alt-f` | +| | `Tab` | +| | `w` | +| Move backward one word| `Alt-LeftArrow` | +| | `alt-b` | +| | `Shift-Tab` | +| | `b` | +| Move to start of this line | `0` | +| Move to start of next line | `Enter` | +| Move to end of this line | `$` | +| Move to start of indented line | `Alt-m` | +| | `^` | +| Move to bottom of scrollback | `G` | +| Move to top of scrollback | `g` | +| Move to top of viewport | `H` | +| Move to middle of viewport | `M` | +| Move to bottom of viewport | `L` | +| Move up one screen | `PageUp | +| | `CTRL-b` | +| Move down one screen | `PageDown` | +| | `CTRL-f` | + +