vim-clang-format icon indicating copy to clipboard operation
vim-clang-format copied to clipboard

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

Open ssh352 opened this issue 5 years ago • 2 comments

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.

ssh352 avatar Apr 29 '20 02:04 ssh352

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 :)

Kypert avatar May 01 '20 20:05 Kypert

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.

ssh352 avatar May 06 '20 06:05 ssh352