diff options
Diffstat (limited to 'indent/config.vim')
-rw-r--r-- | indent/config.vim | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indent/config.vim b/indent/config.vim index 986b8c4d..5b1a3aa4 100644 --- a/indent/config.vim +++ b/indent/config.vim @@ -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') |