This commit is contained in:
Adam Stankiewicz
2021-12-21 14:41:23 +01:00
parent 918610d427
commit 87a26c5bf1
154 changed files with 2479 additions and 2192 deletions

View File

@@ -3,11 +3,12 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'config', 'indent/config.vim')
endif
" Vim indent file
" Language: Autoconf configure.{ac,in} file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20
" TODO: how about nested [()]'s in one line
" what's wrong with '\\\@!'?
" Language: Autoconf configure.{ac,in} file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 24 Sep 2021
" TODO: how about nested [()]'s in one line what's wrong with '\\\@!'?
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -20,6 +21,8 @@ setlocal indentexpr=GetConfigIndent()
setlocal indentkeys=!^F,o,O,=then,=do,=else,=elif,=esac,=fi,=fin,=fil,=done
setlocal nosmartindent
let b:undo_indent = "setl inde< indk< si<"
" Only define the function once.
if exists("*GetConfigIndent")
finish
@@ -66,8 +69,8 @@ function GetConfigIndent()
let ind = s:GetOffsetOf(line, '\[')
endif
" if previous line had an unmatched closing parantheses,
" indent to the matching opening parantheses
" if previous line had an unmatched closing parentheses,
" indent to the matching opening parentheses
if line =~ '[^(]\+\\\@<!)$'
call search(')', 'bW')
let lnum = searchpair('\\\@<!(', '', ')', 'bWn')