vim-autoformat icon indicating copy to clipboard operation
vim-autoformat copied to clipboard

error when no formatter available for current filetype

Open cridemichel opened this issue 5 years ago • 1 comments

Dear Developer, first of all thank you very much for this very nice and useful plugin, I really enjoy using it! I have to report the following minor issue. If I run the command :CurrentFormatter (or :NextFormatter, :PreviousFormatter) and there is no any formatter for the current filetype I get the following error:

Error detected while processing function <SNR>77_CurrentFormatter:
line    5:
E684: list index out of range: 0

and I think it would be better just to suppress it of printing something more informative, such as:

"[vim-autoformat] No default formatter for current filetype"

best regards Cristiano

cridemichel avatar Oct 30 '20 07:10 cridemichel

Agreed, this should be fixed

chtenb avatar Oct 30 '20 15:10 chtenb