New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Member Variable Highlighting #32

Merged
merged 1 commit into from Feb 18, 2017

Conversation

Projects
None yet
3 participants
@zachwhaley
Contributor

zachwhaley commented Aug 31, 2016

In the example below, the bar after foo. would be highlighted as a Function

struct Foo {
    int bar;
};
Foo foo;
foo.bar = 1;
@octol

This comment has been minimized.

Show comment
Hide comment
@octol

octol Oct 17, 2016

Owner

Interesting! I'm thinking perhaps member variables should belong to a separate highlight group, and not 'Function'? Also, it would be pretty neat to have this as a separate flag, something like 'cpp:member_variable_highlight'. What do you think?

Owner

octol commented Oct 17, 2016

Interesting! I'm thinking perhaps member variables should belong to a separate highlight group, and not 'Function'? Also, it would be pretty neat to have this as a separate flag, something like 'cpp:member_variable_highlight'. What do you think?

@dawikur

This comment has been minimized.

Show comment
Hide comment
@dawikur

dawikur Oct 31, 2016

Contributor

@octol
Totally agree. There is still in use m_ prefix (or _ prefix/suffix) to mark member/function parameter. I would love to see any syntax that supports this.

Contributor

dawikur commented Oct 31, 2016

@octol
Totally agree. There is still in use m_ prefix (or _ prefix/suffix) to mark member/function parameter. I would love to see any syntax that supports this.

@zachwhaley

This comment has been minimized.

Show comment
Hide comment
@zachwhaley

zachwhaley Nov 1, 2016

Contributor

@octol Do you have a suggestion for the member variable color?

@dawikur m_ and _ prefixes are purely a style thing, and I don't think they would make for good highlighting candidates.

Contributor

zachwhaley commented Nov 1, 2016

@octol Do you have a suggestion for the member variable color?

@dawikur m_ and _ prefixes are purely a style thing, and I don't think they would make for good highlighting candidates.

@dawikur

This comment has been minimized.

Show comment
Hide comment
@dawikur

dawikur Nov 1, 2016

Contributor

@zachwhaley

Yes, agree. But one can use this to create in-house highlight which.

Contributor

dawikur commented Nov 1, 2016

@zachwhaley

Yes, agree. But one can use this to create in-house highlight which.

Add Member Variable Highlighting
In the example below, the `bar` after `foo.` would be highlighted as a Function

```
struct Foo {
	int bar;
};
Foo foo;
foo.bar = 1;
```

Use the global variable cpp_member_variable_highlight to enable this feature:

```
let g:cpp_member_variable_highlight = 1
```
@zachwhaley

This comment has been minimized.

Show comment
Hide comment
@zachwhaley

zachwhaley Nov 1, 2016

Contributor

@octol Looking at the vim syntax docs, it would seem like Function (aka Identifier) would be the appropriate highlight color for member variables.

If you'd still like it to be something else, I don't mind changing it :)

Contributor

zachwhaley commented Nov 1, 2016

@octol Looking at the vim syntax docs, it would seem like Function (aka Identifier) would be the appropriate highlight color for member variables.

If you'd still like it to be something else, I don't mind changing it :)

@octol octol merged commit 8f1c473 into octol:master Feb 18, 2017

@octol

This comment has been minimized.

Show comment
Hide comment
@octol

octol Feb 18, 2017

Owner

Sorry for the delay!

Owner

octol commented Feb 18, 2017

Sorry for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment