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 Daniel M. Capella (polyzen) - Saturday, 26 February 2022, 23:49 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
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 100%
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

Closed by  Daniel M. Capella (polyzen)
Saturday, 26 February 2022, 23:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  Lost track of this issue. https://gitlab.archlinux.org/pacman/pacm an-contrib/-/commit/020b5331e93fdfb099db b2d95e7f135826942de1
Comment by Daniel M. Capella (polyzen) - Wednesday, 16 January 2019, 06:19 GMT
Will send a patch to the ML tomorrow.

Loading...