diff options
Diffstat (limited to 'runtime/indent/cdl.vim')
-rw-r--r-- | runtime/indent/cdl.vim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/indent/cdl.vim b/runtime/indent/cdl.vim index 4f9b7a8967..fb4fe27310 100644 --- a/runtime/indent/cdl.vim +++ b/runtime/indent/cdl.vim @@ -16,8 +16,8 @@ if exists("*CdlGetIndent") "finish endif -" find out if an "...=..." expresion is an assignment (or a conditional) -" it scans 'line' first, and then the previos lines +" find out if an "...=..." expression is an assignment (or a conditional) +" it scans 'line' first, and then the previous lines fun! CdlAsignment(lnum, line) let f = -1 let lnum = a:lnum @@ -33,7 +33,7 @@ fun! CdlAsignment(lnum, line) endif " it's formula if there's a ';', 'elsE', 'theN', 'enDif' or 'expr' " conditional if there's a '<', '>', 'elseif', 'if', 'and', 'or', 'not', - " 'memberis', 'childrenof' and other \k\+of funcions + " 'memberis', 'childrenof' and other \k\+of functions let f = line[inicio-1] =~? '[en;]' || strpart(line, inicio-4, 4) =~? 'ndif\|expr' endw let lnum = prevnonblank(lnum-1) @@ -106,7 +106,7 @@ fun! CdlGetIndent(lnum) elseif c == '(' || c ==? 'f' " '(' or 'if' let ind = ind + shiftwidth() else " c == '=' - " if it is an asignment increase indent + " if it is an assignment increase indent if f == -1 " we don't know yet, find out let f = CdlAsignment(lnum, strpart(line, 0, inicio)) end @@ -117,11 +117,11 @@ fun! CdlGetIndent(lnum) endw " CURRENT LINE, if it starts with a closing element, decrease indent - " or if it starts with '=' (asignment), increase indent + " or if it starts with '=' (assignment), increase indent if match(thisline, '^\c\s*\(else\|then\|endif\|[);]\)') >= 0 let ind = ind - shiftwidth() elseif match(thisline, '^\s*=') >= 0 - if f == -1 " we don't know yet if is an asignment, find out + if f == -1 " we don't know yet if is an assignment, find out let f = CdlAsignment(lnum, "") end if f == 1 " formula increase it |