diff options
author | Ivan Tham | 2021-06-06 05:09:21 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-07 00:08:08 +0000 |
commit | 2066e866c739fec210df85534b9fbc1de02c155b (patch) | |
tree | b478bbb10504e0780dd07c3e5a4f9c05541a0aa1 | |
parent | 3494bb8ef0e3c43e0507d264867c1e1e572c2367 (diff) |
Add spc w w for window mode
-rw-r--r-- | book/src/keymap.md | 4 | ||||
-rw-r--r-- | helix-term/src/commands.rs | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/book/src/keymap.md b/book/src/keymap.md index 844938ec..5c09a740 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -30,7 +30,7 @@ | g | Enter goto mode | | : | Enter command mode | | z | Enter view mode | -| ctrl-w | Enter window mode | +| ctrl-w | Enter window mode (maybe will be remove for spc w w later) | | space | Enter space mode | | K | Show documentation for the item under the cursor | @@ -151,5 +151,5 @@ This layer is a kludge of mappings I had under leader key in neovim. |-----|-----------| | f | Open file picker | | b | Open buffer picker | -| w | Save changes to file | +| w | Enter window mode | | space | Keep primary selection TODO: it's here because space mode replaced it | diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index f340da91..7992a517 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2381,12 +2381,7 @@ pub fn space_mode(cx: &mut Context) { match ch { 'f' => file_picker(cx), 'b' => buffer_picker(cx), - 'w' => { - // save current buffer - let (view, doc) = cx.current(); - doc.format(view.id); // TODO: merge into save - tokio::spawn(doc.save()); - } + 'w' => window_mode(cx), // ' ' => toggle_alternate_buffer(cx), // TODO: temporary since space mode took it's old key ' ' => keep_primary_selection(cx), |