Skip to content

Instantly share code, notes, and snippets.

@danr
Created March 5, 2017 16:57
Show Gist options
  • Save danr/ae26ea4517045177692da05dda4bf885 to your computer and use it in GitHub Desktop.
Save danr/ae26ea4517045177692da05dda4bf885 to your computer and use it in GitHub Desktop.
simple Kakoune plugin manager
def plug -params 1 %{
%sh{
# Check out the repo to ~/build if it does not exist
if [[ ! -d $HOME/build/$1 ]]; then
(cd $HOME/build; git clone https://github.com/$1)
fi
# Source all .kak files in it
for file in $(echo $HOME/build/$(basename $1)/*.kak); do
echo source "$file"
done
}
}
# Example: Delapouite's expand-region, https://github.com/Delapouite/kakoune-expand-region
plug Delapouite/kakoune-expand-region
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment