aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-04-24 13:03:56 -0700
committerGravatar Tom Willemse2026-04-24 13:03:56 -0700
commit780f7f5c5c0b5f22e2b3700d8ec3d2eac81e3847 (patch)
tree3149f1909230a7a7e84a2496e87c54fdd050437a
parent3ff296ae3d4671143649949ea0470ff3a8daa41d (diff)
downloadnew-dotfiles-780f7f5c5c0b5f22e2b3700d8ec3d2eac81e3847.tar.gz
new-dotfiles-780f7f5c5c0b5f22e2b3700d8ec3d2eac81e3847.zip
glide: Add command to keep other window
-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');