Skip to content

Vim highlighting: recognise comments inside array groups

éclairevoyant c requested to merge eclairevoyant/pacman-contrib:master into master

The motivation for this is to properly highlight comments that are inside PKGBUILD-specific arrays (e.g., validpgpkeys, options). There are useful reasons to comment next to individual values of the array (e.g. the email/name associated with a PGP key, motivation for adding a specific option) and this is also more consistent with how the shell actually parses the file (# outside of a string is treated as a comment).

Example:

# testing

arr=(a b c) # comment 1
arr2=(
    a # comment 2
    b # comment 3
    c # comment 4
)
depends=(
    a # comment 5
)
makedepends=(a) # comment 6
validpgpkeys=(
    a # comment 7
)

Before this change, comments 5 and 7 aren't highlighted as comments. This change fixes this.

Merge request reports

Loading