futilehdl/contrib/fut.vim

18 lines
434 B
VimL
Raw Normal View History

2022-01-17 16:31:03 +00:00
syntax keyword futKeywords module wire reg wire input output proc if else
highlight default link futKeywords Keyword
setlocal indentexpr=FutIndent()
function! FutIndent()
let line = getline(v:lnum)
let previousNum = prevnonblank(v:lnum - 1)
let previous = getline(previousNum)
if previous =~ "{" && previous !~ "}" && line !~ "}"
return indent(previousNum) + &tabstop
endif
return indent(previousNum)
endfunction