Closed VimWei closed 5 years ago
This code is ok:
nnoremap <leader>fm :call FormatexprToggle()<CR>
function! FormatexprToggle()
if &formatexpr == "autofmt#uax14#formatexpr()"
setlocal formatexpr=
echo "Not use uax14."
else
setlocal formatexpr=autofmt#uax14#formatexpr()
echo "Use uax14."
endif
endfunction
I use the following code in vimrc, but it can't toggle. What should I do?