How can I add a vimscript formatter function not an external program?
I am writing a LaTeX manuscript and try out different tools for formatting:
- latexindent.pl
- vim-bucky (
:setlocal formatexpr=bucky#tex#format()) - vimtex (
:setlocal formatexpr=vimtex#format#formatexpr())
I would like to switch conveniently between the different tools with :Neof[ormat] and tab-completion:
:Neof[ormat] vimtex
:Neof[ormat] latexindent
:Neof[ormat] bucky
I typically then run gqip to format a paragraph and look at the new format.
The vimscript formatter functions do not need much configuration in contrast to the external programs.
Searching for the term formatexpr did not list a single match and https://github.com/sbdchd/neoformat#supported-filetypes indicates that only external tools are used yet.
Is this already possible with neoformat?
Neoformat doesn't have any support for formatexpr, but does have support for formatprg.
Since you added the enhancement tag, are you planning to add this in the near future or just to categorize raised issues? Adding support would be great!