Need help displaying colors in C files. I have the vim-css-color plugin but that doesn't seem to work in C

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • vim-polyglot

    A solid language pack for Vim.

  • Incidentally there is not a c.vim files anywhere in my ~/.vim. I did as you said and also tried u/Departure-Silver suggested and now I can finally see some color in my C files! Thanks for your time and detailed answer, sry if I was edgy earlier 😅 now that my stuff works I am a better person. One more thing, would it have any benefits to polyglot at this point? I am a student and have to learn C and some other languages properly

  • nvim-colorizer.lua

    The fastest Neovim colorizer.

  • Even though we're on r/vim, many people here actually use Neovim, so I have to ask: do you have tree-sitter? If so, you need to enable the additional_vim_regex_highlighting option of the highlight module in nvim-treesitter since vim-css-color depends on Vim's syntax highlighting rather than Neovim's. An alternative would be to use a Neovim plugin that does the same thing with tree-sitter support â€“ e.g nvim-colorizer (I haven't tested it at all).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • color_coded

    Discontinued A vim plugin for libclang-based highlighting of C, C++, ObjC

  • I used to use https://github.com/jeaye/color_coded, which is good, but it has a ton of extra dependencies to install, and my experience was that it would get confused sometimes in non c files.

  • nvim-treesitter

    Nvim Treesitter configurations and abstraction layer

  • This is the main reason I switched to neovim, and the syntax highlighting for c, among other things, is great. Treesitter for neovim is what i currently use: https://github.com/nvim-treesitter/nvim-treesitter

  • vim-css-color

    Preview colours in source code while editing

  • Check this out: https://github.com/ap/vim-css-color/issues/85

  • clrzr

    A Vim plugin to QUICKLY & accurately highlight common hex & CSS color representations.

  • This plugin works like a charm in Vim, regardless of the language: https://github.com/BourgeoisBear/clrzr

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