K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / vim / vim74 / indent /
server ip : 104.21.89.46

your ip : 172.71.254.238

H O M E


Filename/usr/share/vim/vim74/indent/idlang.vim
Size1.53 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:56
Last modified03-Jan-2014 03:40
Last accessed06-Jul-2025 12:47
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
" IDL (Interactive Data Language) indent file.
" Language: IDL (ft=idlang)
" Last change: 2012 May 18
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>

" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1

setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP

setlocal indentexpr=GetIdlangIndent(v:lnum)

" Only define the function once.
if exists("*GetIdlangIndent")
finish
endif

function GetIdlangIndent(lnum)
" First non-empty line above the current line.
let pnum = prevnonblank(v:lnum-1)
" v:lnum is the first non-empty line -- zero indent.
if pnum == 0
return 0
endif
" Second non-empty line above the current line.
let pnum2 = prevnonblank(pnum-1)

" Current indent.
let curind = indent(pnum)

" Indenting of continued lines.
if getline(pnum) =~ '\$\s*\(;.*\)\=$'
if getline(pnum2) !~ '\$\s*\(;.*\)\=$'
let curind = curind+&sw
endif
else
if getline(pnum2) =~ '\$\s*\(;.*\)\=$'
let curind = curind-&sw
endif
endif

" Indenting blocks of statements.
if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>'
if getline(pnum) =~? 'begin\>'
elseif indent(v:lnum) > curind-&sw
let curind = curind-&sw
else
return -1
endif
elseif getline(pnum) =~? 'begin\>'
if indent(v:lnum) < curind+&sw
let curind = curind+&sw
else
return -1
endif
endif
return curind
endfunction