dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 4aad3e292d9b34bad85c8f0294796f90036dcbbc (patch)
parent ef2baedd9e2b6ad918438264787b93808a2f59cc
Author: Alex Karle <alex@alexkarle.com>
Date:   Sun, 11 Sep 2022 00:10:17 -0400

acme: Add Bhist/Bls commands to track/navigate Del'd buffers

One of the things I've noticed missing from Vim is the buffer list.
I can :q a file but still get back to it quickly by using :b <file>.

The acme version of this feels like just logging the files as I open
them and then spitting out that log and navigating it with the
plumber!

Diffstat:
Abin/acme-scripts/Bhist | 7+++++++
Abin/acme-scripts/Bls | 4++++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/bin/acme-scripts/Bhist b/bin/acme-scripts/Bhist @@ -0,0 +1,7 @@ +#!/bin/sh +# Bhist -- capture buffer history +set -e +mkdir -p "$HOME/.cache/acme" +echo "Bhist start: $(date)" >> "$HOME/.cache/acme/buffer_history.txt" +9p read acme/log | grep '^[0-9]* new' \ + | sed -l 's/^[0-9]* new//' >> "$HOME/.cache/acme/buffer_history.txt" diff --git a/bin/acme-scripts/Bls b/bin/acme-scripts/Bls @@ -0,0 +1,4 @@ +#!/bin/sh +# Bls -- list buffer history +tail -r "$HOME/.cache/acme/buffer_history.txt" | uniq \ + | plumb -i -d edit -a 'action=showdata filename=+BufferHistory'