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

Antony Lee anntzer.lee at gmail.com
Mon Aug 6 22:27:10 UTC 2018


I generated it with git send-email but then copy-pasted it manually to
gmail, as I haven't set up proper interaction between git and gmail's 2FA.
For completeness, this email also includes the patch (as `git show -p HEAD
>foo.patch`) as an attachment.
Antony

On Thu, Aug 2, 2018 at 9:51 AM, Daniel M. Capella <polycitizen at gmail.com>
wrote:

> 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
>>
>>
> 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/20180807/a9b422ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vim-ftplugin.patch
Type: text/x-patch
Size: 1493 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-contrib/attachments/20180807/a9b422ab/attachment.bin>


More information about the pacman-contrib mailing list