To add to benjifishers answer since you are not specifying the indentation file the default version will be used runtime/indent/verilog.vim
.
If you have not already install pathogen, I recommend that you do so, it makes switching syntax & indentation files very easy.
Basically it will allow you to add plugins as a single folder into ~/.vim/bundle
, which also implies removeing the ones you do not want is easy as deleting a single folder. This is useful when trying out language plugins otherwise they often require files to be put in:
~/.vim/ftdetect
~/.vim/ftplugin
~/.vim/indent
~/.vim/syntax
The Verilog option on vim.org is probably lowly rated because it does not support SystemVerilog Keywords.
I have a SystemVerilog plugin which I use but do not think the re-indent function is fixed there.
Mine is based on nickjones verilog_systemverilog.
The latest under active development looks like nachumk's systemverilog.vim.
NB: for re-indentation I have this setup in my .vimrc which re-indents from ;g
and keeps current position in the file.
"http://technotales.wordpress.com/2010/03/31/preserve-a-vim-function-that-keeps-your-state/
function! Preserve(command)
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
execute a:command
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
map ;g :call Preserve("normal! gg=G")<CR>