b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / share / vim / vim74 / indent /
Filename/usr/share/vim/vim74/indent/treetop.vim
Size677
Permissionrw-r--r--
Ownerapache
Create time26-May-2024 11:06
Last modified17-Jul-2019 02:20
Last accessed17-Jul-2019 02:20
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
" Vim indent file
" Language: Treetop
" Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2011-03-14

if exists("b:did_indent")
finish
endif
let b:did_indent = 1

setlocal indentexpr=GetTreetopIndent()
setlocal indentkeys=0{,0},!^F,o,O,=end
setlocal nosmartindent

if exists("*GetTreetopIndent")
finish
endif

function GetTreetopIndent()
let pnum = prevnonblank(v:lnum - 1)
if pnum == 0
return 0
endif

let ind = indent(pnum)
let line = getline(pnum)

if line =~ '^\s*\%(grammar\|module\|rule\)\>'
let ind += &sw
endif

let line = getline(v:lnum)
if line =~ '^\s*end\>'
let ind -= &sw
end

retur ind
endfunction