A community-driven vim distribution

Home | About | Documentation | Development | Community | Sponsors

Available Layers » lang#c


lang#c layer provides c/c++/object-c language support for SpaceVim.


To use this configuration layer, update custom configuration file with:

  name = "lang#c"



Enable/Disable clang based syntax highlighting.

Set the path to the clang executable

The libclang shared object (dynamic library) file path. By default it is empty.

A dict containing the standards you want to use. The default is:

    "c": "c11",
    "cpp": "c++1z",
    "objc": "c11",
    "objcpp": "c++1z",

Create a .clang file at your project root. You should be able to just paste most of your compile flags in there. You can also use a list [‘-Iwhatever’, …] when loadding this layer.

Here is an example how to use above options:

  name = "lang#c"
  clang_executable = "/usr/bin/clang"
    c = "c11"
    cpp = "c++1z"
    objc = "c11"
    objcpp = "c++1z"

Key bindings

key bindings Descriptions
SPC l d show documentation
SPC l e rename symbol
SPC l f references
SPC l r compile and run current file
g d defintion preview

Hosted on GitHub, Help improve this page — Theme by mattgraham,