aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-15 11:43:43 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-15 11:43:43 +1300
commit7561593d3edcc4d6552608af2dae0dc25af9ee80 (patch)
tree45bbbe1d8fbf0d4ea3d4ae6aa7e1c97ee1bd1766
parentMerge branch 'feature/vim-sh' into develop (diff)
parentMention the Vim plugin dist target in README.md (diff)
downloaddotfiles-7561593d3edcc4d6552608af2dae0dc25af9ee80.tar.gz
dotfiles-7561593d3edcc4d6552608af2dae0dc25af9ee80.zip
Merge branch 'feature/vim-plug-dist' into develop
* feature/vim-plug-dist: Mention the Vim plugin dist target in README.md Add Makefile targets for Vim plugin dists
-rw-r--r--.gitignore1
-rw-r--r--Makefile91
-rw-r--r--README.md9
-rw-r--r--dist/vim-plugin.sh18
4 files changed, 113 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 6d07e894..f9ae6fcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,3 +166,4 @@ gnupg/gpg.conf
gnupg/gpg.conf.m4
include/mktd.m4
urxvt/ext/select
+vim/dist
diff --git a/Makefile b/Makefile
index 63d192f8..4d292b46 100644
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,19 @@
lint-sh \
lint-urxvt \
lint-vim \
- lint-xinit
+ lint-xinit \
+ dist-vim-plugin \
+ dist-vim-plugin-auto-backupdir \
+ dist-vim-plugin-auto-swapdir \
+ dist-vim-plugin-auto-undodir \
+ dist-vim-plugin-big-file-options \
+ dist-vim-plugin-command-typos \
+ dist-vim-plugin-copy-linebreak \
+ dist-vim-plugin-fixed-join \
+ dist-vim-plugin-insert-suspend-hlsearch \
+ dist-vim-plugin-mail-mutt \
+ dist-vim-plugin-strip-trailing-whitespace \
+ dist-vim-plugin-toggle-option-flag
.SUFFIXES:
.SUFFIXES: .awk .bash .m4 .mi5 .pl .sed .sh
@@ -261,7 +273,8 @@ clean distclean:
gnupg/gpg.conf.m4 \
include/mktd.m4 \
man/man8/dotfiles.7df \
- urxvt/ext/select
+ urxvt/ext/select \
+ vim/dist/*
.awk:
sh bin/shb.sh awk -f < $< > $@
@@ -633,3 +646,77 @@ lint-vim:
lint-xinit: check-xinit
sh lint/xinit.sh
+
+dist-vim-plugin: dist-vim-plugin-auto-backupdir \
+ dist-vim-plugin-auto-swapdir \
+ dist-vim-plugin-auto-undodir \
+ dist-vim-plugin-big-file-options \
+ dist-vim-plugin-command-typos \
+ dist-vim-plugin-copy-linebreak \
+ dist-vim-plugin-detect-background \
+ dist-vim-plugin-fixed-join \
+ dist-vim-plugin-insert-suspend-hlsearch \
+ dist-vim-plugin-mail-mutt \
+ dist-vim-plugin-strip-trailing-whitespace \
+ dist-vim-plugin-toggle-option-flag
+
+dist-vim-plugin-auto-backupdir: \
+ vim/plugin/auto_backupdir.vim \
+ vim/doc/auto_backupdir.txt \
+ VERSION
+ sh dist/vim-plugin.sh auto_backupdir
+dist-vim-plugin-auto-swapdir: \
+ vim/plugin/auto_swapdir.vim \
+ vim/doc/auto_swapdir.txt \
+ VERSION
+ sh dist/vim-plugin.sh auto_swapdir
+dist-vim-plugin-auto-undodir: \
+ vim/plugin/auto_undodir.vim \
+ vim/doc/auto_undodir.txt \
+ VERSION
+ sh dist/vim-plugin.sh auto_undodir
+dist-vim-plugin-big-file-options: \
+ vim/plugin/big_file_options.vim \
+ vim/doc/big_file_options.txt \
+ VERSION
+ sh dist/vim-plugin.sh big_file_options
+dist-vim-plugin-command-typos: \
+ vim/plugin/command_typos.vim \
+ vim/doc/command_typos.txt \
+ VERSION
+ sh dist/vim-plugin.sh command_typos
+dist-vim-plugin-copy-linebreak: \
+ vim/plugin/copy_linebreak.vim \
+ vim/doc/copy_linebreak.txt \
+ VERSION
+ sh dist/vim-plugin.sh copy_linebreak
+dist-vim-plugin-detect-background: \
+ vim/autoload/detect_background.vim \
+ vim/doc/detect_background.txt \
+ VERSION
+ sh dist/vim-plugin.sh detect_background
+dist-vim-plugin-fixed-join: \
+ vim/plugin/fixed_join.vim \
+ vim/doc/fixed_join.txt \
+ VERSION
+ sh dist/vim-plugin.sh fixed_join
+dist-vim-plugin-insert-suspend-hlsearch: \
+ vim/plugin/insert_suspend_hlsearch.vim \
+ vim/doc/insert_suspend_hlsearch.txt \
+ VERSION
+ sh dist/vim-plugin.sh insert_suspend_hlsearch
+dist-vim-plugin-mail-mutt: \
+ vim/plugin/mail_mutt.vim \
+ vim/doc/mail_mutt.txt \
+ VERSION
+ sh dist/vim-plugin.sh mail_mutt
+dist-vim-plugin-strip-trailing-whitespace: \
+ vim/plugin/strip_trailing_whitespace.vim \
+ vim/doc/strip_trailing_whitespace.txt \
+ VERSION
+ sh dist/vim-plugin.sh strip_trailing_whitespace
+dist-vim-plugin-toggle-option-flag: \
+ vim/plugin/toggle_option_flag.vim \
+ vim/doc/toggle_option_flag.txt \
+ VERSION
+ sh dist/vim-plugin.sh toggle_option_flag
diff --git a/README.md b/README.md
index 3758a009..17d1afb3 100644
--- a/README.md
+++ b/README.md
@@ -352,16 +352,17 @@ structures like functions, I like to implement it as a plugin in
`~/.vim/plugin` and/or `~/.vim/autoload`. There's documentation for each of
those in `~/.vim/doc`.
+Any/all of those plugins may eventually be spun off into their own repositories
+in the future, but for the moment they live here. You can create distribution
+packages for them with `make dist-vim-plugin`; they will be created in
+`vim/dist`.
+
I also define a few rules specific to file types I often edit in
`~/.vim/after/ftplugin`, including some local mappings for checking, linting,
and tidying, and a few more in `~/.vim/after/indent`. There are also a few
tweaks to core syntax files in `~/.vim/after/syntax`, especially for shell
script (`sh.vim`).
-Any/all of the plugins may eventually be spun off into their own repositories
-in the future, but for the moment they live here. Contact me if you find one of
-them useful and you'd like to see it in its own distribution.
-
Third-party plugins are in submodules in `~/.vim/bundle`, loaded using Tim
Pope's [pathogen.vim](https://github.com/tpope/vim-pathogen).
diff --git a/dist/vim-plugin.sh b/dist/vim-plugin.sh
new file mode 100644
index 00000000..0f549be4
--- /dev/null
+++ b/dist/vim-plugin.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+ver=$(awk -Fv 'NR<2&&$0=$NF' VERSION) || exit
+mkdir -p -- vim/dist || exit
+cd -- vim/dist || exit
+for pn ; do
+ dn=vim-$(printf '%s' "$pn"|sed 's/_/-/g')-$ver
+ mkdir -p -- "$pn"
+ for fn in ../*/"$pn".txt ../*/"$pn".vim ; do
+ [ -e "$fn" ] || continue
+ sdn=$fn
+ sdn=${sdn#../}
+ sdn=${sdn%/*}
+ mkdir -p -- "$pn"/"$sdn"
+ cp -- "$fn" "$pn"/"$sdn"
+ done
+ tar c "$pn" | gzip > "$dn".tar.gz || exit
+ rm -r -- "$pn"
+done