Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#61412 - {pacman-contrib} Add vim indent file for PKGBUILD

Attached to Project: Arch Linux
Opened by Junpei Fukuda (kingan) - Tuesday, 15 January 2019, 16:16 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 15 January 2019, 18:17 GMT
Task Type Feature Request
Category Arch Projects
Status Assigned
Assigned To Johannes Löthberg (demize)
Daniel M. Capella (polyzen)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

Description:
When 'filetype' option is PKGBUILD in vim (which is set by /usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim included in this package), adjusting indentation of PKGBUILD files by = works incorrectly.
This is because when 'indentexpr' option is empty, vim assumes the file being edited is indented like C-style languages.
This problem can be solved by this package additionally providing indent file for PKGBUILD, together with currently included ftplugin and syntax files.

Since PKGBUILD is basically just a bash script, indent/PKGBUILD.vim should be as easy as
```
if exists("b:did_indent")
finish
endif
let b:did_indent = 1

runtime! indent/sh.vim
```

Additional info:
* pacman-contrib 1.1.0-1
This task depends upon

Comment by Daniel M. Capella (polyzen) - Wednesday, 16 January 2019, 06:19 GMT
Will send a patch to the ML tomorrow.

Loading...