From febadcb3c4d604605577d67019c9ecfa282c2b81 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 6 Jun 2026 00:22:13 +0530 Subject: Add marks-add-all-buffers command to load all buffers as marks --- autoload/marks.kak | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'autoload') diff --git a/autoload/marks.kak b/autoload/marks.kak index d7aea04..92f45a2 100644 --- a/autoload/marks.kak +++ b/autoload/marks.kak @@ -41,10 +41,22 @@ define-command marks-edit-all %{ edit %sh{ "$kak_config/scripts/marks.fnl" show-path } } +define-command marks-add-all-buffers %{ + eval %sh{ + echo "$kak_quoted_buflist" | xargs -n1 | while IFS= read file; do + if [ -f "$file" ]; then + "$kak_config/scripts/marks.fnl" add "$(realpath "$file")" + fi + done + } + marks-show +} + declare-user-mode marks map global user a ': enter-user-mode-with-count marks' -docstring 'Marks mode' map global user ': marks-select %val{count}' -docstring 'Select marks' map global marks a ': marks-add %val{buffile} %opt{user_mode_count}' -docstring 'Create new mark from buffer' +map global marks A ': marks-add-all-buffers' -docstring 'Load all buffer files as marks' map global marks d ': marks-delete %val{buffile}' -docstring 'Delete mark' map global marks C ': marks-clear' -docstring 'Clear mark' map global marks e ': marks-edit-all' -docstring 'Open buffer to edit marks' -- cgit v1.3.1