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

Can vim-clang-format correctly indent as I write code? #103

Open
ssh352 opened this issue Apr 29, 2020 · 2 comments
Open

Can vim-clang-format correctly indent as I write code? #103

ssh352 opened this issue Apr 29, 2020 · 2 comments

Comments

@ssh352
Copy link

ssh352 commented Apr 29, 2020

I've already used it to format existing code and it works beautifully. Can it also correctly indent as I write code(c++ for example)? or should I still set the correct indent via other plugins or vim options? Thank you.

@Kypert
Copy link

Kypert commented May 1, 2020

Maybe the closest you can come is to use g:clang_format#auto_format_on_insert_leave, would that satisfy your use-case? I think I know what you are after, but I think you need to set indent and snippets to conform to the style is still a good idea in order to hit somewhat close to home as you enter code in insert mode :)

@ssh352
Copy link
Author

ssh352 commented May 6, 2020

Maybe the closest you can come is to use g:clang_format#auto_format_on_insert_leave, would that satisfy your use-case? I think I know what you are after, but I think you need to set indent and snippets to conform to the style is still a good idea in order to hit somewhat close to home as you enter code in insert mode :)

thank you indeed this is a way to simulate what I need.

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

2 participants