Skip to content

Instantly share code, notes, and snippets.

@danr
Created March 5, 2017 16:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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