robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ae7ab90159
master
1" Vim indent file 2" Language: Scala (http://scala-lang.org/) 3" Original Author: Stefan Matthias Aust 4" Modifications By: Derek Wyatt 5" URL: https://github.com/derekwyatt/vim-scala 6" Last Change: 2016 Aug 26 7" 2023 Aug 28 by Vim Project (undo_indent) 8 9if exists ( "b:did_indent" ) 10finish 11endif 12let b: did_indent = 1 13 14setlocal autoindent 15setlocal indentexpr = GetScalaIndent () 16setlocal indentkeys = 0{,0},0),!^F,<>>,o,O,e,=case,<CR> 17 18let b: undo_indent = "setl ai< inde< indk<" 19 20if exists ( "*GetScalaIndent" ) 21finish 22endif 23let s: keepcpo = & cpo 24set cpo & vim 25 26let s: annotationMatcher = '@[A-Za-z._]\+\s\+' 27let s: modifierMatcher = s: annotationMatcher . '\|\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\|final\s\+' 28let s: defMatcher = '\%(' . s: modifierMatcher . '\)*\<def\>' 29let s: valMatcher = '\%(' . s: modifierMatcher . '\|lazy\s\+\)*\<va[lr]\>' 30let s: funcNameMatcher = '\w\+' 31let s: typeSpecMatcher = '\%(\s*\[\_[^\]]*\]\)' 32let s: defArgMatcher = '\%((\_.\{-})\)' 33let s: returnTypeMatcher = '\%(:\s*\w\+' . s: typeSpecMatcher . '\?\)' 34let g: fullDefMatcher = '^\s*' . s: defMatcher . '\s\+' . s: funcNameMatcher . '\s*' . s: typeSpecMatcher . '\?\s*' . s: defArgMatcher . '\?\s*' . s: returnTypeMatcher . '\?\s*[={]' 35 36function ! scala#ConditionalConfirm ( msg ) 37if 0 38call confirm ( a: msg ) 39endif 40endfunction 41 42function ! scala#GetLine ( lnum ) 43let line = substitute ( getline ( a: lnum ), '//.*$' , '' , '' ) 44let line = substitute ( line , '"\(.\|\\"\)\{-}"' , '""' , 'g' ) 45return line 46endfunction 47 48function ! scala#CountBrackets ( line , openBracket , closedBracket ) 49let line = substitute ( a: line , '"\(.\|\\"\)\{-}"' , '' , 'g' ) 50let open = substitute ( line , '[^' . a: openBracket . ']' , '' , 'g' ) 51let close = substitute ( line , '[^' . a: closedBracket . ']' , '' , 'g' ) 52return strlen ( open ) - strlen ( close ) 53endfunction 54 55function ! scala#CountParens ( line ) 56return scala#CountBrackets ( a: line , '(' , ')' ) 57endfunction 58 59function ! scala#CountCurlies ( line ) 60return scala#CountBrackets ( a: line , '{' , '}' ) 61endfunction 62 63function ! scala#LineEndsInIncomplete ( line ) 64if a: line =~ '[.,]\s*$' 65return 1 66else 67return 0 68endif 69endfunction 70 71function ! scala#LineIsAClosingXML ( line ) 72if a: line =~ '^\s*</\w' 73return 1 74else 75return 0 76endif 77endfunction 78 79function ! scala#LineCompletesXML ( lnum , line ) 80let savedpos = getpos ( '.' ) 81call setpos ( '.' , [ savedpos [ 0 ], a: lnum , 0 , savedpos [ 3 ]]) 82let tag = substitute ( a: line , '^.*</\([^>]*\)>.*$' , '\1' , '' ) 83let [ lineNum , colnum ] = searchpairpos ( '<' . tag . '>' , '' , '</' . tag . '>' , 'Wbn' ) 84call setpos ( '.' , savedpos ) 85let pline = scala#GetLine ( prevnonblank ( lineNum - 1 )) 86if pline =~ '=\s*$' 87return 1 88else 89return 0 90endif 91endfunction 92 93function ! scala#IsParentCase () 94let savedpos = getpos ( '.' ) 95call setpos ( '.' , [ savedpos [ 0 ], savedpos [ 1 ], 0 , savedpos [ 3 ]]) 96let [ l , c ] = searchpos ( '^\s*\%(' . s: defMatcher . '\|\%(\<case\>\)\)' , 'bnW' ) 97let retvalue = -1 98if l != 0 && search ( '\%' . l . 'l\s*\<case\>' , 'bnW' ) 99let retvalue = l 100endif 101call setpos ( '.' , savedpos ) 102return retvalue 103endfunction 104 105function ! scala#CurlyMatcher () 106let matchline = scala#GetLineThatMatchesBracket ( '{' , '}' ) 107if scala#CountParens ( scala#GetLine ( matchline )) < 0 108let savedpos = getpos ( '.' ) 109call setpos ( '.' , [ savedpos [ 0 ], matchline , 9999 , savedpos [ 3 ]]) 110call searchpos ( '{' , 'Wbc' ) 111call searchpos ( ')' , 'Wb' ) 112let [ lnum , colnum ] = searchpairpos ( '(' , '' , ')' , 'Wbn' ) 113call setpos ( '.' , savedpos ) 114let line = scala#GetLine ( lnum ) 115if line =~ '^\s*' . s: defMatcher 116return lnum 117else 118return matchline 119endif 120else 121return matchline 122endif 123endfunction 124 125function ! scala#GetLineAndColumnThatMatchesCurly () 126return scala#GetLineAndColumnThatMatchesBracket ( '{' , '}' ) 127endfunction 128 129function ! scala#GetLineAndColumnThatMatchesParen () 130return scala#GetLineAndColumnThatMatchesBracket ( '(' , ')' ) 131endfunction 132 133function ! scala#GetLineAndColumnThatMatchesBracket ( openBracket , closedBracket ) 134let savedpos = getpos ( '.' ) 135let curline = scala#GetLine ( line ( '.' )) 136if curline =~ a: closedBracket . '.*' . a: openBracket . '.*' . a: closedBracket 137call setpos ( '.' , [ savedpos [ 0 ], savedpos [ 1 ], 0 , savedpos [ 3 ]]) 138call searchpos ( a: closedBracket . '\ze[^' . a: closedBracket . a: openBracket . ']*' . a: openBracket , 'W' ) 139else 140call setpos ( '.' , [ savedpos [ 0 ], savedpos [ 1 ], 9999 , savedpos [ 3 ]]) 141call searchpos ( a: closedBracket , 'Wbc' ) 142endif 143let [ lnum , colnum ] = searchpairpos ( a: openBracket , '' , a: closedBracket , 'Wbn' ) 144call setpos ( '.' , savedpos ) 145return [ lnum , colnum ] 146endfunction 147 148function ! scala#GetLineThatMatchesCurly () 149return scala#GetLineThatMatchesBracket ( '{' , '}' ) 150endfunction 151 152function ! scala#GetLineThatMatchesParen () 153return scala#GetLineThatMatchesBracket ( '(' , ')' ) 154endfunction 155 156function ! scala#GetLineThatMatchesBracket ( openBracket , closedBracket ) 157let [ lnum , colnum ] = scala#GetLineAndColumnThatMatchesBracket ( a: openBracket , a: closedBracket ) 158return lnum 159endfunction 160 161function ! scala#NumberOfBraceGroups ( line ) 162let line = substitute ( a: line , '[^()]' , '' , 'g' ) 163if strlen ( line ) == 0 164return 0 165endif 166let line = substitute ( line , '^)*' , '' , 'g' ) 167if strlen ( line ) == 0 168return 0 169endif 170let line = substitute ( line , '^(' , '' , 'g' ) 171if strlen ( line ) == 0 172return 0 173endif 174let c = 1 175let counter = 0 176let groupCount = 0 177while counter < strlen ( line ) 178let char = strpart ( line , counter , 1 ) 179if char == '(' 180let c = c + 1 181elseif char == ')' 182let c = c - 1 183endif 184if c == 0 185let groupCount = groupCount + 1 186endif 187let counter = counter + 1 188endwhile 189return groupCount 190endfunction 191 192function ! scala#MatchesIncompleteDefValr ( line ) 193if a: line =~ '^\s*\%(' . s: defMatcher . '\|' . s: valMatcher . '\).*[=({]\s*$' 194return 1 195else 196return 0 197endif 198endfunction 199 200function ! scala#LineIsCompleteIf ( line ) 201if scala#CountBrackets ( a: line , '{' , '}' ) == 0 && 202 \scala#CountBrackets ( a: line , '(' , ')' ) == 0 && 203 \a: line =~ '^\s*\<if\>\s*([^)]*)\s*\S.*$' 204return 1 205else 206return 0 207endif 208endfunction 209 210function ! scala#LineCompletesIfElse ( lnum , line ) 211if a: line =~ '^\s*\%(\<if\>\|\%(}\s*\)\?\<else\>\)' 212return 0 213endif 214let result = search ( '^\%(\s*\<if\>\s*(.*).*\n\|\s*\<if\>\s*(.*)\s*\n.*\n\)\%(\s*\<else\>\s*\<if\>\s*(.*)\s*\n.*\n\)*\%(\s*\<else\>\s*\n\|\s*\<else\>[^{]*\n\)\?\%' . a: lnum . 'l' , 'Wbn' ) 215if result != 0 && scala#GetLine ( prevnonblank ( a: lnum - 1 )) !~ '{\s*$' 216return result 217endif 218return 0 219endfunction 220 221function ! scala#GetPrevCodeLine ( lnum ) 222" This needs to skip comment lines 223return prevnonblank ( a: lnum - 1 ) 224endfunction 225 226function ! scala#InvertBracketType ( openBracket , closedBracket ) 227if a: openBracket == '(' 228return [ '{' , '}' ] 229else 230return [ '(' , ')' ] 231endif 232endfunction 233 234function ! scala#Testhelper ( lnum , line , openBracket , closedBracket , iteration ) 235let bracketCount = scala#CountBrackets ( a: line , a: openBracket , a: closedBracket ) 236" There are more '}' braces than '{' on this line so it may be completing the function definition 237if bracketCount < 0 238let [ matchedLNum , matchedColNum ] = scala#GetLineAndColumnThatMatchesBracket ( a: openBracket , a: closedBracket ) 239if matchedLNum == a: lnum 240return -1 241endif 242let matchedLine = scala#GetLine ( matchedLNum ) 243if ! scala#MatchesIncompleteDefValr ( matchedLine ) 244let bracketLine = substitute ( substitute ( matchedLine , '\%' . matchedColNum . 'c.*$' , '' , '' ), '[^{}()]' , '' , 'g' ) 245if bracketLine =~ '}$' 246return scala#Testhelper ( matchedLNum , matchedLine , '{' , '}' , a: iteration + 1 ) 247elseif bracketLine =~ ')$' 248return scala#Testhelper ( matchedLNum , matchedLine , '(' , ')' , a: iteration + 1 ) 249else 250let prevCodeLNum = scala#GetPrevCodeLine ( matchedLNum ) 251if scala#MatchesIncompleteDefValr ( scala#GetLine ( prevCodeLNum )) 252return prevCodeLNum 253else 254return -1 255endif 256endif 257else 258" return indent value instead 259return matchedLNum 260endif 261" There's an equal number of '{' and '}' on this line so it may be a single line function definition 262elseif bracketCount == 0 263if a: iteration == 0 264let otherBracketType = scala#InvertBracketType ( a: openBracket , a: closedBracket ) 265return scala#Testhelper ( a: lnum , a: line , otherBracketType [ 0 ], otherBracketType [ 1 ], a: iteration + 1 ) 266else 267let prevCodeLNum = scala#GetPrevCodeLine ( a: lnum ) 268let prevCodeLine = scala#GetLine ( prevCodeLNum ) 269if scala#MatchesIncompleteDefValr ( prevCodeLine ) && prevCodeLine !~ '{\s*$' 270return prevCodeLNum 271else 272let possibleIfElse = scala#LineCompletesIfElse ( a: lnum , a: line ) 273if possibleIfElse != 0 274let defValrLine = prevnonblank ( possibleIfElse - 1 ) 275let possibleDefValr = scala#GetLine ( defValrLine ) 276if scala#MatchesIncompleteDefValr ( possibleDefValr ) && possibleDefValr =~ '^.*=\s*$' 277return possibleDefValr 278else 279return -1 280endif 281else 282return -1 283endif 284endif 285endif 286else 287return -1 288endif 289endfunction 290 291function ! scala#Test ( lnum , line , openBracket , closedBracket ) 292return scala#Testhelper ( a: lnum , a: line , a: openBracket , a: closedBracket , 0 ) 293endfunction 294 295function ! scala#LineCompletesDefValr ( lnum , line ) 296let bracketCount = scala#CountBrackets ( a: line , '{' , '}' ) 297if bracketCount < 0 298let matchedBracket = scala#GetLineThatMatchesBracket ( '{' , '}' ) 299if ! scala#MatchesIncompleteDefValr ( scala#GetLine ( matchedBracket )) 300let possibleDefValr = scala#GetLine ( prevnonblank ( matchedBracket - 1 )) 301if matchedBracket != -1 && scala#MatchesIncompleteDefValr ( possibleDefValr ) 302return 1 303else 304return 0 305endif 306else 307return 0 308endif 309elseif bracketCount == 0 310let bracketCount = scala#CountBrackets ( a: line , '(' , ')' ) 311if bracketCount < 0 312let matchedBracket = scala#GetLineThatMatchesBracket ( '(' , ')' ) 313if ! scala#MatchesIncompleteDefValr ( scala#GetLine ( matchedBracket )) 314let possibleDefValr = scala#GetLine ( prevnonblank ( matchedBracket - 1 )) 315if matchedBracket != -1 && scala#MatchesIncompleteDefValr ( possibleDefValr ) 316return 1 317else 318return 0 319endif 320else 321return 0 322endif 323elseif bracketCount == 0 324let possibleDefValr = scala#GetLine ( prevnonblank ( a: lnum - 1 )) 325if scala#MatchesIncompleteDefValr ( possibleDefValr ) && possibleDefValr =~ '^.*=\s*$' 326return 1 327else 328let possibleIfElse = scala#LineCompletesIfElse ( a: lnum , a: line ) 329if possibleIfElse != 0 330let possibleDefValr = scala#GetLine ( prevnonblank ( possibleIfElse - 1 )) 331if scala#MatchesIncompleteDefValr ( possibleDefValr ) && possibleDefValr =~ '^.*=\s*$' 332return 2 333else 334return 0 335endif 336else 337return 0 338endif 339endif 340else 341return 0 342endif 343endif 344endfunction 345 346function ! scala#SpecificLineCompletesBrackets ( lnum , openBracket , closedBracket ) 347let savedpos = getpos ( '.' ) 348call setpos ( '.' , [ savedpos [ 0 ], a: lnum , 9999 , savedpos [ 3 ]]) 349let retv = scala#LineCompletesBrackets ( a: openBracket , a: closedBracket ) 350call setpos ( '.' , savedpos ) 351 352return retv 353endfunction 354 355function ! scala#LineCompletesBrackets ( openBracket , closedBracket ) 356let savedpos = getpos ( '.' ) 357let offline = 0 358while offline == 0 359let [ lnum , colnum ] = searchpos ( a: closedBracket , 'Wb' ) 360let [ lnumA , colnumA ] = searchpairpos ( a: openBracket , '' , a: closedBracket , 'Wbn' ) 361if lnum != lnumA 362let [ lnumB , colnumB ] = searchpairpos ( a: openBracket , '' , a: closedBracket , 'Wbnr' ) 363let offline = 1 364endif 365endwhile 366call setpos ( '.' , savedpos ) 367if lnumA == lnumB && colnumA == colnumB 368return lnumA 369else 370return -1 371endif 372endfunction 373 374function ! GetScalaIndent () 375" Find a non-blank line above the current line. 376let prevlnum = prevnonblank ( v: lnum - 1 ) 377 378" Hit the start of the file, use zero indent. 379if prevlnum == 0 380return 0 381endif 382 383let ind = indent ( prevlnum ) 384let originalIndentValue = ind 385let prevline = scala#GetLine ( prevlnum ) 386let curlnum = v: lnum 387let curline = scala#GetLine ( curlnum ) 388if get ( g:, 'scala_scaladoc_indent' , 0 ) 389let star_indent = 2 390else 391let star_indent = 1 392end 393 394if prevline =~ '^\s*/\*\*' 395if prevline =~ '\*/\s*$' 396return ind 397else 398return ind + star_indent 399endif 400endif 401 402if curline =~ '^\s*\*' 403return cindent ( curlnum ) 404endif 405 406" If this line starts with a { then make it indent the same as the previous line 407if curline =~ '^\s*{' 408call scala#ConditionalConfirm ( "1" ) 409" Unless, of course, the previous one is a { as well 410if prevline !~ '^\s*{' 411call scala#ConditionalConfirm ( "2" ) 412return indent ( prevlnum ) 413endif 414endif 415 416" '.' continuations 417if curline =~ '^\s*\.' 418if prevline =~ '^\s*\.' 419return ind 420else 421return ind + shiftwidth () 422endif 423endif 424 425" Indent html literals 426if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$' 427call scala#ConditionalConfirm ( "3" ) 428return ind + shiftwidth () 429endif 430 431" assumes curly braces around try-block 432if curline =~ '^\s*}\s*\<catch\>' 433return ind - shiftwidth () 434elseif curline =~ '^\s*\<catch\>' 435return ind 436endif 437 438" Add a shiftwidth()' after lines that start a block 439" If 'if', 'for' or 'while' end with ), this is a one-line block 440" If 'val', 'var', 'def' end with =, this is a one-line block 441if ( prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups ( prevline ) <= 1 ) 442 \|| prevline =~ '^\s*' . s: defMatcher . '.*=\s*$' 443 \|| prevline =~ '^\s*' . s: valMatcher . '.*[=]\s*$' 444 \|| prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$' 445 \|| prevline =~ '=\s*$' 446call scala#ConditionalConfirm ( "4" ) 447let ind = ind + shiftwidth () 448elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>' 449return ind 450endif 451 452let lineCompletedBrackets = 0 453let bracketCount = scala#CountBrackets ( prevline , '{' , '}' ) 454if bracketCount > 0 || prevline =~ '.*{\s*$' 455call scala#ConditionalConfirm ( "5b" ) 456let ind = ind + shiftwidth () 457elseif bracketCount < 0 458call scala#ConditionalConfirm ( "6b" ) 459" if the closing brace actually completes the braces entirely, then we 460" have to indent to line that started the whole thing 461let completeLine = scala#LineCompletesBrackets ( '{' , '}' ) 462if completeLine != -1 463call scala#ConditionalConfirm ( "8b" ) 464let prevCompleteLine = scala#GetLine ( prevnonblank ( completeLine - 1 )) 465" However, what actually started this part looks like it was a function 466" definition, so we need to indent to that line instead. This is 467" actually pretty weak at the moment. 468if prevCompleteLine =~ '=\s*$' 469call scala#ConditionalConfirm ( "9b" ) 470let ind = indent ( prevnonblank ( completeLine - 1 )) 471else 472call scala#ConditionalConfirm ( "10b" ) 473let ind = indent ( completeLine ) 474endif 475else 476let lineCompletedBrackets = 1 477endif 478endif 479 480if ind == originalIndentValue 481let bracketCount = scala#CountBrackets ( prevline , '(' , ')' ) 482if bracketCount > 0 || prevline =~ '.*(\s*$' 483call scala#ConditionalConfirm ( "5a" ) 484let ind = ind + shiftwidth () 485elseif bracketCount < 0 486call scala#ConditionalConfirm ( "6a" ) 487" if the closing brace actually completes the braces entirely, then we 488" have to indent to line that started the whole thing 489let completeLine = scala#LineCompletesBrackets ( '(' , ')' ) 490if completeLine != -1 && prevline !~ '^.*{\s*$' 491call scala#ConditionalConfirm ( "8a" ) 492let prevCompleteLine = scala#GetLine ( prevnonblank ( completeLine - 1 )) 493" However, what actually started this part looks like it was a function 494" definition, so we need to indent to that line instead. This is 495" actually pretty weak at the moment. 496if prevCompleteLine =~ '=\s*$' 497call scala#ConditionalConfirm ( "9a" ) 498let ind = indent ( prevnonblank ( completeLine - 1 )) 499else 500call scala#ConditionalConfirm ( "10a" ) 501let ind = indent ( completeLine ) 502endif 503else 504" This is the only part that's different from from the '{', '}' one below 505" Yup... some refactoring is necessary at some point. 506let ind = ind + ( bracketCount * shiftwidth ()) 507let lineCompletedBrackets = 1 508endif 509endif 510endif 511 512if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' && 513 \! scala#LineIsCompleteIf ( prevline ) && 514 \prevline !~ '^.*}\s*$' 515let ind = ind - shiftwidth () 516endif 517 518" Subtract a shiftwidth()' on '}' or html 519let curCurlyCount = scala#CountCurlies ( curline ) 520if curCurlyCount < 0 521call scala#ConditionalConfirm ( "14a" ) 522let matchline = scala#CurlyMatcher () 523return indent ( matchline ) 524elseif curline =~ '^\s*</[a-zA-Z][^>]*>' 525call scala#ConditionalConfirm ( "14c" ) 526return ind - shiftwidth () 527endif 528 529let prevParenCount = scala#CountParens ( prevline ) 530if prevline =~ '^\s*\<for\>.*$' && prevParenCount > 0 531call scala#ConditionalConfirm ( "15" ) 532let ind = indent ( prevlnum ) + 5 533endif 534 535let prevCurlyCount = scala#CountCurlies ( prevline ) 536if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>' 537call scala#ConditionalConfirm ( "16" ) 538let ind = ind + shiftwidth () 539endif 540 541if ind == originalIndentValue && curline =~ '^\s*\<case\>' 542call scala#ConditionalConfirm ( "17" ) 543let parentCase = scala#IsParentCase () 544if parentCase != -1 545call scala#ConditionalConfirm ( "17a" ) 546return indent ( parentCase ) 547endif 548endif 549 550if prevline =~ '^\s*\*/' 551 \|| prevline =~ '*/\s*$' 552call scala#ConditionalConfirm ( "18" ) 553let ind = ind - star_indent 554endif 555 556if scala#LineEndsInIncomplete ( prevline ) 557call scala#ConditionalConfirm ( "19" ) 558return ind 559endif 560 561if scala#LineIsAClosingXML ( prevline ) 562if scala#LineCompletesXML ( prevlnum , prevline ) 563call scala#ConditionalConfirm ( "20a" ) 564return ind - shiftwidth () 565else 566call scala#ConditionalConfirm ( "20b" ) 567return ind 568endif 569endif 570 571if ind == originalIndentValue 572"let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline) 573"if indentMultiplier != 0 574" call scala#ConditionalConfirm("19a") 575" let ind = ind - (indentMultiplier * shiftwidth()) 576let defValrLine = scala#Test ( prevlnum , prevline , '{' , '}' ) 577if defValrLine != -1 578call scala#ConditionalConfirm ( "21a" ) 579let ind = indent ( defValrLine ) 580elseif lineCompletedBrackets == 0 581call scala#ConditionalConfirm ( "21b" ) 582if scala#GetLine ( prevnonblank ( prevlnum - 1 )) =~ '^.*\<else\>\s*\%(//.*\)\?$' 583call scala#ConditionalConfirm ( "21c" ) 584let ind = ind - shiftwidth () 585elseif scala#LineCompletesIfElse ( prevlnum , prevline ) 586call scala#ConditionalConfirm ( "21d" ) 587let ind = ind - shiftwidth () 588elseif scala#CountParens ( curline ) < 0 && curline =~ '^\s*)' && scala#GetLine ( scala#GetLineThatMatchesBracket ( '(' , ')' )) =~ '.*(\s*$' 589" Handles situations that look like this: 590" 591" val a = func( 592" 10 593" ) 594" 595" or 596" 597" val a = func( 598" 10 599" ).somethingHere() 600call scala#ConditionalConfirm ( "21e" ) 601let ind = ind - shiftwidth () 602endif 603endif 604endif 605 606call scala#ConditionalConfirm ( "returning " . ind ) 607 608return ind 609endfunction 610 611let & cpo = s: keepcpo 612unlet s: keepcpo 613 614" vim:set sw=2 sts=2 ts=8 et: 615" vim600:fdm=marker fdl=1 fdc=0: