From 78140240cc68ea0cb8c58c70ef954d9a1b8b155c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 23 Jul 2020 10:12:57 +0200 Subject: [PATCH] Add keybinding to jump to next unread buffer --- keybindings.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keybindings.js b/keybindings.js index 0c37a3c..524b720 100644 --- a/keybindings.js +++ b/keybindings.js @@ -22,6 +22,20 @@ export const keybindings = [ }); }, }, + { + key: "a", + altKey: true, + description: "Jump to next buffer with activity", + execute: (app) => { + // TODO: order by priority, then by age + for (var buf of app.state.buffers.values()) { + if (buf.unread != Unread.NONE) { + app.switchBuffer(buf.name); + break; + } + } + }, + }, ]; export function setup(app) {