Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent on Save? #74

Open
rossmcf opened this issue Oct 19, 2016 · 0 comments
Open

Indent on Save? #74

rossmcf opened this issue Oct 19, 2016 · 0 comments

Comments

@rossmcf
Copy link

rossmcf commented Oct 19, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant