[courses] [c] lesson 11: enumerating boolean/hacking vim
Julie
txjulie at austin.rr.com
Wed Nov 13 23:57:46 EST 2002
Morgon Kanter wrote:
>
> First, I found the vim startup scripts directory (for debian it was
> /usr/share/vim). open up syntax/c.vim in your favorite editor, and do search
> for int. After about the 7th search for int, you'll see a line that says:
> syn keyword cType int long short char void
> add boolean after void
>
> What we just did was change vim's startup script to find the syntax
> highlighting for a file that ends in ".c"
>
> Anyway, to make use of this, we do a boolean enum:
> enum boolean {false, true};
> #define boolean enum boolean
You might want to reconsider this and use a typedef instead.
typedef enum {false, true} boolean;
--
Julianne Frances Haugh Life is either a daring adventure
txjulie at austin.rr.com or nothing at all.
-- Helen Keller
More information about the Courses
mailing list