@@ -1938,6 +1938,17 @@ pub fn jump_backward(cx: &mut Context) {
1941+pub fn vsplit(cx: &mut Context) {
1942+ // TODO: use doc.id directly, this can only split saved files
1943+ let path = cx.doc().path().cloned();
1945+ if let Some(path) = path {
1946+ // open the same file again. this will vsplit
1948+ .open(path, helix_view::editor::Action::HorizontalSplit);
1941pub fn space_mode(cx: &mut Context) {
1952pub fn space_mode(cx: &mut Context) {
1942 cx.on_next_key(move |cx, event| {
1953 cx.on_next_key(move |cx, event| {
1943 if let KeyEvent {
1954 if let KeyEvent {
@@ -1949,6 +1960,7 @@ pub fn space_mode(cx: &mut Context) {
1949 match ch {
1960 match ch {
1950 'f' => file_picker(cx),
1961 'f' => file_picker(cx),
1951 'b' => buffer_picker(cx),
1962 'b' => buffer_picker(cx),
1952 // ' ' => toggle_alternate_buffer(cx),
1964 // ' ' => toggle_alternate_buffer(cx),
1953 _ => (),
1965 _ => (),