From 29f77b9c5fd209c28d490031e24811b030fdd9e3 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Sun, 20 Jun 2021 08:17:22 +0530 Subject: Fix docx formatting and links --- book/src/keymap.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'book/src/keymap.md') diff --git a/book/src/keymap.md b/book/src/keymap.md index aee4b3a4..f5b1143e 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -155,10 +155,10 @@ This layer is similar to vim keybindings as kakoune does not support window. | Key | Description | | ----- | ------------- | -| `w`, `ctrl-w` | Switch to next window | -| `v`, `ctrl-v` | Vertical right split | -| `h`, `ctrl-h` | Horizontal bottom split | -| `q`, `ctrl-q` | Close current window | +| `w`, `Ctrl-w` | Switch to next window | +| `v`, `Ctrl-v` | Vertical right split | +| `h`, `Ctrl-h` | Horizontal bottom split | +| `q`, `Ctrl-q` | Close current window | ## Space mode @@ -184,4 +184,4 @@ Keys to use within picker. | `Enter` | Open selected | | `Ctrl-h` | Open horizontally | | `Ctrl-v` | Open vertically | -| `Escape`, `ctrl-c` | Close picker | +| `Escape`, `Ctrl-c` | Close picker | -- cgit v1.2.3-70-g09d2 From ffb54b4eac3403f145679b9be3691d24e13a9599 Mon Sep 17 00:00:00 2001 From: Benoît CORTIER Date: Sun, 20 Jun 2021 09:39:10 -0400 Subject: book: document new system clipboard mappings --- book/src/keymap.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'book/src/keymap.md') diff --git a/book/src/keymap.md b/book/src/keymap.md index f5b1143e..267f4378 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -171,6 +171,11 @@ This layer is a kludge of mappings I had under leader key in neovim. | `s` | Open symbol picker (current document) | | `w` | Enter [window mode](#window-mode) | | `space` | Keep primary selection TODO: it's here because space mode replaced it | +| `p` | paste system clipboard after selections | +| `P` | paste system clipboard before selections | +| `y` | join and yank selections to clipboard | +| `Y` | yank main selection to clipboard | +| `R` | replace selections by clipboard contents | # Picker -- cgit v1.2.3-70-g09d2 From f41688d960ef89c29c4a51c872b8406fb8f81a85 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 20 Jun 2021 23:37:11 +0900 Subject: Merge `x` and `X` --- book/src/keymap.md | 5 ++--- helix-term/src/commands.rs | 15 --------------- helix-term/src/keymap.rs | 4 +--- 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'book/src/keymap.md') diff --git a/book/src/keymap.md b/book/src/keymap.md index 267f4378..1e159f81 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -69,9 +69,8 @@ | `;` | Collapse selection onto a single cursor | | `Alt-;` | Flip selection cursor and anchor | | `%` | Select entire file | -| `x` | Select current line | -| `X` | Extend to next line | -| `[` | Expand selection to parent syntax node TODO: pick a key | +| `x` | Select current line, if already selected, extend to next line | +| `` | Expand selection to parent syntax node TODO: pick a key | | `J` | join lines inside selection | | `K` | keep selections matching the regex TODO: overlapped by hover help | | `Space` | keep only the primary selection TODO: overlapped by space mode | diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 8c290979..8b6e2d88 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -888,21 +888,6 @@ fn search_selection(cx: &mut Context) { // -fn select_line(cx: &mut Context) { - let count = cx.count(); - let (view, doc) = current!(cx.editor); - - let pos = doc.selection(view.id).primary(); - let text = doc.text(); - - let line = text.char_to_line(pos.head); - let start = text.line_to_char(line); - let end = text - .line_to_char(std::cmp::min(doc.text().len_lines(), line + count)) - .saturating_sub(1); - - doc.set_selection(view.id, Selection::single(start, end)); -} fn extend_line(cx: &mut Context) { let count = cx.count(); let (view, doc) = current!(cx.editor); diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 8ea9b387..46d495c3 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -196,9 +196,7 @@ impl Default for Keymaps { key!(';') => Command::collapse_selection, alt!(';') => Command::flip_selections, key!('%') => Command::select_all, - key!('x') => Command::select_line, - key!('X') => Command::extend_line, - // or select mode X? + key!('x') => Command::extend_line, // extend_to_whole_line, crop_to_whole_line -- cgit v1.2.3-70-g09d2