vim-json
vim-json copied to clipboard
Indent on Save?
This is more of a question than an issue, but is it possible to indent on save without losing your position in the file? I'm currently have this in my vimrc:
:autocmd BufWritePre *.json :normal gg=G
While it indents well, even if my JSON is invalid, it jumps me to the top of the buffer every time. Can this be avoided?
Thanks, Ross