Skip to content

Commit

Permalink
only use 'j' format option if available
Browse files Browse the repository at this point in the history
Fixes #13 and #15, part of #14
  • Loading branch information
dag committed Jul 20, 2013
1 parent 9033f54 commit b9b2014
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ftplugin/fish.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ setlocal comments=:#
setlocal commentstring=#%s
setlocal define=\\v^\\s*function>
setlocal foldexpr=fish#Fold()
setlocal formatoptions+=ron1j
setlocal formatoptions+=ron1
setlocal formatoptions-=t
setlocal include=\\v^\\s*\\.>
setlocal iskeyword=@,48-57,-,_,.,/
setlocal suffixesadd^=.fish

" Use the 'j' format option when available.
if v:version ># 703 || v:version ==# 703 && has('patch541')
setlocal formatoptions+=j
endif

if executable('fish_indent')
setlocal formatexpr=fish#Format()
endif
Expand Down

0 comments on commit b9b2014

Please sign in to comment.