I started using c-support recently. When I open a c file, some predefined lines are added automatically to it along with #define <stdlib.h> line. I want to modify this default template. I searched for help regarding c-support inside vim (:help csupport) but I couldn't understand how to change the default template file. I doubt that help talks of templates which can be added by shortcuts but not the one I want to modify. Any help on this?

  • 1
    You should give a look at :help template-support-intro
    – Zorzi
    Apr 15 '20 at 20:02
  • I didn't understand which file to edit and what to edit. Can you give me some more hint? Apr 17 '20 at 6:34

After peeking through some files inside the directories the plugin I found a file named c.comments.template inside c-support directory. Inside this file, the predefined skeleton (which is added everytime a new C file is created) exists. In that file search for #include<stdlib.h> and replace it with #include<stdio.h> .

  • If this is the answer to your question, you should accept it by clicking on the checkmark.
    – D. Ben Knoble
    May 21 '20 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.