[Slackbuilds-users] Vim indent settings for SlackBuilds
erich.public at protonmail.com
Fri Sep 4 15:16:55 UTC 2020
Does anyone have (or aware of) a vim formatting rules file for SlackBuilds? I recently submitted a SlackBuild that had mixed tabs and spaces... I want to avoid that oversight in the future.
After a quick internet search all I turned up was this, which is for automatically treating the *.info file as a shell script:
Put the following in .vimrc:
autocmd BufEnter,BufNew *.info call CheckSlackBuildInfo()
if filereadable(expand('%:p:r'). '.SlackBuild')
Then, if you open a file whose extension is .info and there's a corresponding SlackBuild in the same directory, vim will treat the .info file as shell script.
Based on the SlackBuild template file, it looks like SlackBuild files should be indented 2 spaces, and indentation should always be with spaces (no tabs).
I think I want the following options set:
After inheriting all other settings from the filetype 'sh'.
More information about the SlackBuilds-users