How do I insert C/C++-type loops and statements templates automatically in Vim?
closed as too broad by Tumbler41, Herb Wolfe, peterh says reinstate Monica, jamessan, jalanb Dec 7 '18 at 3:12
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
There exist many ways to define snippets for control statements: via abbreviations or via snippets. I remember a Q/A about abbreviations versus snippet plugins.
TL;DR: We can achieve the same things with both. The main difference is that snippet plugins provide a much simpler way to define maintainable code snippets.
For instance, in my lh-cpp plugin you could find some truly complex abbreviation definitions of control-statement code snippets, and also code snippet definitions for my mu-template plugin, plus many truly advanced skeletons/snippets and wizards for C++. c.vim plugin provides other snippets and abbreviations.
Most snippet plugin users prefer snipmate & co over mu-template and lh-cpp.