[PATCH] Set vim 'commentstring' option in ftplugin/PKGBUILD.vim.

Daniel M. Capella polycitizen at gmail.com
Thu Aug 2 07:51:03 UTC 2018


On July 16, 2018 6:20:30 AM EDT, Antony Lee <anntzer.lee at gmail.com> wrote:
>From 05c11d3e1a7fc0079fca4ccf3694a88a9d2d0146 Mon Sep 17 00:00:00 2001
>From: Antony Lee <anntzer.lee at gmail.com>
>Date: Mon, 16 Jul 2018 12:02:56 +0200
>Subject: [PATCH] Set vim 'commentstring' option in
>ftplugin/PKGBUILD.vim.
>
>This option enables, in particular, commenting plugings (e.g.
>https://github.com/tomtom/tcomment_vim) to know how toggle comments on
>PKGBUILDs.  See FS#59321.
>
>Signed-off-by: Antony Lee <anntzer.lee at gmail.com>
>---
> src/Makefile.am               | 7 ++++++-
> src/vim/ftplugin/PKGBUILD.vim | 4 ++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
> create mode 100644 src/vim/ftplugin/PKGBUILD.vim
>
>diff --git a/src/Makefile.am b/src/Makefile.am
>index 792da70..e756899 100644
>--- a/src/Makefile.am
>+++ b/src/Makefile.am
>@@ -14,11 +14,15 @@ bin_SCRIPTS = \
> bin_PROGRAMS = pacsort pactree
>
> vim_ftdetect_dir = $(vim_dir)/ftdetect
>+vim_ftplugin_dir = $(vim_dir)/ftplugin
> vim_syntax_dir = $(vim_dir)/syntax
>
> vim_ftdetect__DATA = \
>  vim/ftdetect/PKGBUILD.vim
>
>+vim_ftplugin__DATA = \
>+ vim/ftplugin/PKGBUILD.vim
>+
> vim_syntax__DATA = \
>  vim/syntax/PKGBUILD.vim
>
>@@ -62,7 +66,8 @@ EXTRA_DIST = \
>  rankmirrors.sh.in \
>  updpkgsums.sh.in \
>  vim/syntax/PKGBUILD.vim \
>- vim/ftdetect/PKGBUILD.vim
>+ vim/ftdetect/PKGBUILD.vim \
>+ vim/ftplugin/PKGBUILD.vim
>
> # Files that should be removed, but which Automake does not know.
> MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
>diff --git a/src/vim/ftplugin/PKGBUILD.vim
>b/src/vim/ftplugin/PKGBUILD.vim
>new file mode 100644
>index 0000000..cbb46a9
>--- /dev/null
>+++ b/src/vim/ftplugin/PKGBUILD.vim
>@@ -0,0 +1,4 @@
>+if exists("b:did_ftplugin") | finish | endif
>+let b:did_ftplugin = 1
>+
>+setlocal commentstring=#\ %s
>-- 
>2.18.0

Did you send this patch using `git send-email`? Can't seem to apply it.
-- 
Best,
polyzen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.archlinux.org/pipermail/pacman-contrib/attachments/20180802/6d6c7a4f/attachment.html>


More information about the pacman-contrib mailing list