aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-09 08:46:08 +0000
committerBlaž Hrastnik2021-04-09 09:57:46 +0000
commit865429643bf924e7b2b7fbbc7f239c469bbd22ca (patch)
tree9a809b444b8fd6bb894c69a74728937694b575c6
parent4e31d1521bf9bb59f6485954d4ada16bf853c85a (diff)
<space>w for save, <space>c for close current split.
-rw-r--r--helix-term/src/commands.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 0cbc3f9d..53ec2fbf 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1873,6 +1873,15 @@ pub fn space_mode(cx: &mut Context) {
'f' => file_picker(cx),
'b' => buffer_picker(cx),
'v' => vsplit(cx),
+ 'w' => {
+ // save current buffer
+ let doc = cx.doc();
+ smol::block_on(doc.save());
+ }
+ 'c' => {
+ // close current split
+ cx.editor.close(cx.view_id);
+ }
// ' ' => toggle_alternate_buffer(cx),
_ => (),
}