vim-codefmt
vim-codefmt copied to clipboard
Use vim's builtin format mapping
Removed autocmd from mappings file, PTAL
Thanks!
Removed autocmd from mappings file, PTAL
Looks like the autocmd is still in the mappings file? I'd suggest to instead restructure a bit to define a codefmt#SetFormatExprIfAvailable and then replace the unconditional autocmd with some instructions in the help file / README to recommend putting these lines in your vimrc:
augroup codefmt_formatexpr
autocmd!
autocmd BufEnter * call codefmt#SetFormatExprIfAvailable()
augroup END