diff options
Diffstat (limited to 'ftplugin')
| -rw-r--r-- | ftplugin/dart.vim | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/ftplugin/dart.vim b/ftplugin/dart.vim new file mode 100644 index 00000000..9b2e8d32 --- /dev/null +++ b/ftplugin/dart.vim @@ -0,0 +1,31 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 +   +if exists('b:did_ftplugin') +  finish +endif +let b:did_ftplugin = 1 + +" Enable automatic indentation (2 spaces) if variable g:dart_style_guide is set  +if exists('g:dart_style_guide') +  setlocal expandtab +  setlocal shiftwidth=2 +  setlocal softtabstop=2 + +  setlocal formatoptions-=t +endif + +" Set 'comments' to format dashed lists in comments. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// + +setlocal commentstring=//%s +let s:win_sep = (has('win32') || has('win64')) ? '/' : '' +let &l:errorformat = +  \ join([ +  \   ' %#''file://' . s:win_sep . '%f'': %s: line %l pos %c:%m', +  \   '%m' +  \ ], ',') + + +let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms<' + +endif | 
