From da0eb165815e6f4881880f008bdd5c08507903e7 Mon Sep 17 00:00:00 2001 From: James Dugan <43224155+jdugan6240@users.noreply.github.com> Date: Sun, 24 Jan 2021 20:26:50 -0700 Subject: [PATCH 1/3] Update README.md Added auto-install snippet and fixed linking issues --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8ee716a..a149157 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,8 @@ how **plug.kak** works, or add additional steps for `plug` to perform for you. These are available keywords: - [branch, tag, commit][9] -- [load-path][10] -- [subset][22] +- [load-path][22] +- [subset][10] - [noload][11] - [do][12] - [theme][13] @@ -116,7 +116,7 @@ it. To do so, add this after plugin name: `branch "branch_name"`, `tag #### Loading subset of files from plugin repository If you want to load only part of a plugin (assuming that plugin allows this) you -can use `load` keyword followed by filenames. If `load` isn't specified `plug` +can use `subset` keyword followed by filenames. If `subset` isn't specified `plug` uses it's default value, which is `*.kak`, and by specifying a value, you just override default one. Here's an example: @@ -420,6 +420,23 @@ plugin, depending on its state. This command accepts an optional argument ### `plug` And last but not least: `plug`. Load plugin from plugin installation directory by its name. +## Tips and Tricks + +### Automatic Installation + +In your kakrc, replace the ```source "%val{config}/plugins/plug.kak/rc/plug.kak"``` line with the following: + +```kak +try %{ + source "%val{config}/plugins/plug.kak/rc/plug.kak" +} catch %{ nop %sh{ + if [ ! -d "$kak_config/plugins/plug.kak" ]; then + git clone "https://github.com/robertmeta/plug.kak.git" "$kak_config/plugins/plug.kak" + echo "source '%val{config}/plugins/plug.kak/rc/plug.kak'" + fi +}} +``` + [1]: https://img.shields.io/github/issues/robertmeta/plug.kak.svg [2]: https://github.com/robertmeta/plug.kak/issues [3]: https://img.shields.io/github/license/robertmeta/plug.kak.svg From c456573682ad12c35b1057887012941e55870135 Mon Sep 17 00:00:00 2001 From: James Dugan <43224155+jdugan6240@users.noreply.github.com> Date: Sun, 24 Jan 2021 20:38:11 -0700 Subject: [PATCH 2/3] Update README.md Swapped placement of "load-path" and "subset" in list of available plug flags --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a149157..c172a83 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,8 @@ how **plug.kak** works, or add additional steps for `plug` to perform for you. These are available keywords: - [branch, tag, commit][9] -- [load-path][22] - [subset][10] +- [load-path][22] - [noload][11] - [do][12] - [theme][13] From 1719b9cddcd1da62be25ba35b887ba02ab0b8de9 Mon Sep 17 00:00:00 2001 From: James Dugan <43224155+jdugan6240@users.noreply.github.com> Date: Tue, 26 Jan 2021 08:49:04 -0700 Subject: [PATCH 3/3] Consistent indentation Co-authored-by: Ivan Tham --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c172a83..d513cbb 100644 --- a/README.md +++ b/README.md @@ -428,12 +428,12 @@ In your kakrc, replace the ```source "%val{config}/plugins/plug.kak/rc/plug.kak" ```kak try %{ - source "%val{config}/plugins/plug.kak/rc/plug.kak" + source "%val{config}/plugins/plug.kak/rc/plug.kak" } catch %{ nop %sh{ - if [ ! -d "$kak_config/plugins/plug.kak" ]; then - git clone "https://github.com/robertmeta/plug.kak.git" "$kak_config/plugins/plug.kak" - echo "source '%val{config}/plugins/plug.kak/rc/plug.kak'" - fi + if [ ! -d "$kak_config/plugins/plug.kak" ]; then + git clone "https://github.com/robertmeta/plug.kak.git" "$kak_config/plugins/plug.kak" + echo "source '%val{config}/plugins/plug.kak/rc/plug.kak'" + fi }} ```