aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glide/.config/glide/glide.ts17
1 files changed, 13 insertions, 4 deletions
diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts
index 62651a9..a155010 100644
--- a/glide/.config/glide/glide.ts
+++ b/glide/.config/glide/glide.ts
@@ -322,15 +322,23 @@ const split_window = glide.excmds.create({
});
});
-const unsplit_window = glide.excmds.create({
- name: 'unsplit_window',
- description: 'Remove the current split of windows',
+const keep_window = glide.excmds.create({
+ name: 'keep_window',
+ description: 'Remove the current split of windows, keeping the focused window',
}, ({ tab_id }) => {
if (glide.unstable.split_views.has_split_view(tab_id)) {
glide.unstable.split_views.separate(tab_id);
}
});
+const delete_window = glide.excmds.create({
+ name: 'delete_window',
+ description: 'Remove the current split of windows, removing the focused window',
+}, async ({ tab_id }) => {
+ glide.excmds.execute(`other_window`);
+ glide.excmds.execute(`keep_window`);
+});
+
const other_window = glide.excmds.create({
name: 'other_window',
description: 'Focus other window',
@@ -346,7 +354,8 @@ const other_window = glide.excmds.create({
});
glide.keymaps.set('normal', '<C-x>4b', 'split_window');
-glide.keymaps.set('normal', '<C-x>1', 'unsplit_window');
+glide.keymaps.set('normal', '<C-x>1', 'keep_window');
+glide.keymaps.set('normal', '<C-x>0', 'delete_window');
glide.keymaps.set('normal', '<A-o>', 'other_window');
glide.include('sitesearch.glide.ts');