Last active
February 13, 2017 13:14
-
-
Save danr/e69a55129a3fd27f1f098d4e167afccd to your computer and use it in GitHub Desktop.
simple Kakoune buffer changer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Buffers (by danr 2017, public domain) | |
map global normal <a-,> :bp<ret>:bufinfo<ret> | |
map global normal <a-.> :bn<ret>:bufinfo<ret> | |
map global normal <a--> ga:bufinfo<ret> | |
map global normal <a-d> :db<ret>:bufinfo<ret> | |
map global normal <a-q> :db!<ret>:bufinfo<ret> | |
def bufinfo %{ | |
%sh{ | |
echo -n info -- %^ | |
(while read -d : buf; do | |
if [[ "$buf" == "$kak_bufname" ]]; then | |
echo "> $buf <" | |
else | |
echo " $buf " | |
fi | |
done) <<< "$kak_buflist" | |
echo ^ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment