diff --git a/README.md b/README.md index 9927a68..b569c3c 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,9 @@ Here is a list of formatprograms that are supported by default, and thus will be * `remark` for __Markdown__. A Javascript based markdown processor that can be installed with `npm install -g remark`. More info is available at https://github.com/wooorm/remark. +* `fprettify` for modern __Fortran__. + Download from [official repository](https://github.com/pseewald/fprettify). Install with `./setup.py install` or `./setup.py install --user`. + ## Debugging If you're struggling with getting a formatter to work, it may help to set vim-autoformat in diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 1bf6571..9a21f34 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -332,3 +332,13 @@ endif if !exists('g:formatters_markdown') let g:formatters_markdown = ['remark_markdown'] endif + +" Fortran +if !exists('g:formatdef_fprettify') + let g:formatdef_fprettify = '"fprettify --no-report-errors --indent=".&shiftwidth' +endif + +if !exists('g:formatters_fortran') + let g:formatters_fortran = ['fprettify'] +endif +