Changeset 13 for vim_script_tf/trunk


Ignore:
Timestamp:
Jul 28, 2011, 5:31:42 PM (13 years ago)
Author:
ertl-ishikawa
Message:

ELIFに関するルールを追加

Location:
vim_script_tf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vim_script_tf/trunk/indent/tf.vim

    r10 r13  
    6363setlocal indentexpr=GetTFIndent()
    6464setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=:
    65 setlocal indentkeys+==\$ELSE\$,=\$END\$,0;
     65setlocal indentkeys+==\$ELSE\$,=\$ELIF\$,=\$END\$,0;
    6666
    6767" Only define the function once:
     
    107107        " No indentation if the previous line didn't end with "\":
    108108        " (Could be annoying, but it lets you know if you made a mistake.)
    109         if line =~# '\$\(FOREACH\|JOINEACH\|IF\|FUNCTION\)[ ]'
     109        if line =~# '\$\(FOREACH\|JOINEACH\|IF\|ELIF\|FUNCTION\)[ ]'
    110110        if line !~# '\$END\$'
    111111            let ind = ind + &sw
     
    131131            let ind = ind + &sw
    132132        endif
     133    elseif line =~# '\$ELIF[ ]'
     134        let ind = ind - &sw
     135
     136        if line =~# '\$\(FOREACH\|JOINEACH\|IF\|FUNCTION\)[ ]'
     137            let ind = ind + &sw
     138        elseif line =~# '\$\(ERROR\|WORNING\)[ \$]'
     139            let ind = ind + &sw
     140        endif
    133141    endif
    134142   
  • vim_script_tf/trunk/syntax/tf.vim

    r11 r13  
    9090syn keyword tfMacro contained INCLUDE
    9191syn keyword tfMacro contained IF
     92syn keyword tfMacro contained ELIF
    9293syn keyword tfMacro contained FOREACH
    9394syn keyword tfMacro contained JOINEACH
Note: See TracChangeset for help on using the changeset viewer.