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

Indent on Save?

Open rossmcf opened this issue 9 years ago • 0 comments

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

rossmcf avatar Oct 19 '16 10:10 rossmcf