Getting vim to recognize objects?

J

japh

Vim is swell about turning standard varbiable types green - like:

int myAge;
double myIQ;

or whatnot.

But if I have a class Point and declare a Point:
Point upperLeftCorner;
Point lowerRightCorner;

instead of high-lighting the word Point, it shows up white like any
other word.

Any setting in vim to get it to recognize declared class types ?

Thanks
 
S

Siemel Naran

japh said:
Vim is swell about turning standard varbiable types green - like:
But if I have a class Point and declare a Point:
Point upperLeftCorner;

You can type

:syn keyword cType Point

This will color "Point" in green.


But what if you have this

namespace Math { class Point { }; }

int main() {
Math::point Point;
}

Here you want the Math::point to show up in green, but only both Point will
show up in green.
 
J

japh

thanks. i was hoping there was a way vim could do this dynamically so I
don't have to type in each class name, but it is good to know this
option is there.

thanks again
 
J

Jon Wilson

japh said:
Vim is swell about turning standard varbiable types green - like:

int myAge;
double myIQ;

or whatnot.

But if I have a class Point and declare a Point:
Point upperLeftCorner;
Point lowerRightCorner;

instead of high-lighting the word Point, it shows up white like any
other word.

Any setting in vim to get it to recognize declared class types ?

Thanks


I have found the tips on vim's homepage to be exceedingly helpful. You
could try looking through them.

Here is vim's page's URL:

http://www.vim.org/

and the tip page:

http://www.vim.org/tips/index.php

Regards,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top