Created
March 5, 2017 16:57
-
-
Save danr/ae26ea4517045177692da05dda4bf885 to your computer and use it in GitHub Desktop.
simple Kakoune plugin manager
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
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