How to automatically include C headers in vim?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • vim-snippets

    vim-snipmate default snippets (Previously snipmate-snippets)

    Auto adding include files or a specific non-static function is generally a bad idea, but I use yasnippet on Emacs for copyright/licensing info, this seemingly has the same purpose but oriented towards vim users, which makes file templates trivial (on Emacs at least, I don’t usually use vim unless I can’t use Emacs or mg for some reason).

  • cnew

    Automatically create C header/implementation file pairs

    It doesn’t do exactly what you’re asking but I made a program called cnew which is supposed to do this in a more general sense. Once configured you can type for example ‘cnew http.c’ and it’ll make both http.c and http.h. The header file will contain header guards and be automatically included by the implementation file.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts