mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-22 22:31:30 +03:00
3c3f7e761e
* Move extraneous stuff out of pkg/urbit/* * s/urb/herb/g * Removed some boilerplate for `urbit` builds. * Build urbit tests and run them in the nix build.
37 lines
563 B
VimL
37 lines
563 B
VimL
" Public Domain
|
|
" Credit Goes to fode
|
|
"
|
|
" With contributions from Philip C Monk
|
|
|
|
if exists("b:did_indent")
|
|
finish
|
|
endif
|
|
|
|
let b:did_indent = 1
|
|
|
|
|
|
setlocal indentexpr=HoonIndent(v:lnum)
|
|
setlocal nolisp
|
|
setlocal autoindent
|
|
|
|
if exists("*HoonIndent")
|
|
finish
|
|
endif
|
|
|
|
function! HoonIndent(lnum)
|
|
let prevlnum = prevnonblank(a:lnum-1)
|
|
if prevlnum == 0
|
|
return 0
|
|
endif
|
|
let prevl = substitute(getline(prevlnum),'::.*$','','')
|
|
|
|
let ind = indent(prevlnum)
|
|
if prevl =~ '++\s*\w*\s*$'
|
|
" luslus operator
|
|
let ind += &sw
|
|
endif
|
|
|
|
return ind
|
|
endfunction
|
|
|