For my fortran ft
I use
au BufWritePre <buffer> :silent %!fprettify --silent
in my ftplugin
.
The fprettify is a python
script with many command line options
, using argparse
.
Now, my question is, is it possible to set those option in vimrc and use the string using let in my ftplugin
?
e.g.
in .vimrc
:
fprettify_options = "--silent --strict-indent"
and in my ftplugin
:
let g:fprettify_options = get (g:, fprettify_options, "--strict")
au BufWritePre <buffer> :silent %!fprettify g:fprettify_options
I am getting error:
directory g:fprettify_options does not exist!
This is probably because fprettify g:fprettify_options
.
How can I pass the values to fprettify
?