Comments (8)
Did you enable syntax in vimrc
?
filetype plugin indent on
syntax on
from vim-cpp-modern.
- After you opened
filename.c
, check the output of:scriptnames
. - And can you post a screenshot?
from vim-cpp-modern.
I've done as you suggested, but it doesn't look any different. Here's the screenshot:
from vim-cpp-modern.
Well, you show me a screenshot that contains almost only comments. scriptnames
shows that the syntax file is loaded. What did you expect from the plugin? It looks like main()
is highlighted, so it seems to work.
from vim-cpp-modern.
Apologies for the confusion - I thought it was the output of scriptnames
that you were interested in.
But no - at least I don't think it's working - vim-cpp-modern doesn't seem to be having any effect. The "syntax coloring" that you're seeing is from the "industry" coloring that I chose... using the color command IIRC. Here's another screenshot that might make that more clear:
from vim-cpp-modern.
And here's a tree
output showing where it's installed:
/home/pi/.vim
└── pack
├── colorschemes
│ ├── opt
│ └── start
├── others
│ ├── opt
│ └── start
└── syntax
├── opt
└── start
└── vim-cpp-modern
├── after
│ └── syntax
│ ├── cpp.vim
│ └── c.vim
└── README.md
14 directories, 3 files
And here's my ~/.vimrc
file:
set number
set cursorline
syntax on
set tabstop=4
set shiftwidth=4
set expandtab
colorscheme industry
set laststatus=2
set statusline=%F
filetype plugin indent on
syntax on
from vim-cpp-modern.
The function names are highlighted, so the plugin seems to work.
If you add let g:cpp_member_highlight = 1
, the plugin will also highlight struct members, as in foo.bar
or foo->bar
.
from vim-cpp-modern.
The function names are highlighted, so the plugin seems to work.
If you add
let g:cpp_member_highlight = 1
, the plugin will also highlight struct members, as infoo.bar
orfoo->bar
.
Ah - so the syntax highlighting is adjustable then?
The files I'm working with now don't have a struct
, but I did notice that (in some of my comments in the code) that when I typed in the word NOTE:
, that seems to be highlighted - at least a different color from the rest of my comment.
Maybe I was expecting too much? I already had the "generic"(?) syntax
option in .vimrc
before adding vim-cpp-modern
.
from vim-cpp-modern.
Related Issues (20)
- can we have highlight on "#define" and "using vec = vector<int>" that self define type HOT 3
- concept is not highlighted HOT 6
- About the displayed colorscheme HOT 2
- Hightlighting custom types that have the `_t` postfix HOT 3
- concept/requires highlight HOT 2
- std::ref and std::cref HOT 5
- How can I mark variable with specific beginnings as member variable? HOT 1
- Brace construction in lambdas is highlighting as an error HOT 2
- the highlight doesn't change after installing HOT 12
- The highlight doesn't work on mac with files named with "*.C" and ".H" HOT 3
- Template function not highlighted HOT 1
- how to make cpp_no_cpp20 work HOT 1
- Add highlighting for C++20 `concept` and `requires` keywords HOT 1
- no highlight for from_chars HOT 2
- i think most of us agree user defined type starts with capital letter HOT 1
- adding modules related keywords HOT 2
- Missing highlight of C++23 integer literals HOT 2
- let g:cpp_no_function_highlight=1 option missing / not working HOT 2
- Incorrect function highlighting HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-cpp-modern.