blob: c4545f9a8869ba1f4dc2f7a30c796b7b33504bae [file] [log] [blame]
" Vim ftplugin for Fidl
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo&vim
augroup fidl.vim
autocmd!
setlocal comments=sr1:/*,mb:*,ex:*/,:///,://
setlocal commentstring=//%s
setlocal formatoptions-=t formatoptions+=croqnlj
if get(g:, 'fidl_recommended_style', 1)
let b:fidl_set_style = 1
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
endif
let b:undo_ftplugin = "
\ setlocal formatoptions< comments< commentstring< formatlistpat<
\|if exists('b:fidl_set_style')
\|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth<
\|endif
\"
augroup END
let &cpo = s:save_cpo
unlet s:save_cpo