sponsor Vim development Vim logo Vim Book Ad

User Defined Type Highlighter : Generate vim highlighting groups from C++ typedefs, structs, and classes.

 script karma  Rating 45/14, Downloaded by 4051  Comments, bugs, improvements  Vim wiki

created by
Michael Brailsford
 
script type
utility
 
description
Generates vim highlighting groups for typedefs, classes, and structs that you have defined in your C++ header files.  There are a few options that you can set to control its behavior, so read the included help file so you can know what options you can change in your .vimrc if you want.
 
install details
Thanks to Gavin Sinclair for suggesting that I package this differently.  You should unpackage udt.tar.gz in your ~/.vim directory.  This will add the usr_include.vim file to your ftplugin/cpp directory.  There is no longer a need to source the file in your .vimrc, it will be sourced whenever you load up a C++ file.  You should move the udt.rb file to wherever you keep your scripts (ie. ~/bin).
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
udt.tar.gz 1.1 2002-07-19 6.0 Michael Brailsford Changed a few things and fixed some bugs.  Mainly, I made it so you do not have to move any files to make the plugin work, if you don't want to.  It is still *highly* recommend that you do move the files as suggested in the help file, but you now have the option to not move anything.  Updated the help files, and fixed some typos and other minor things.
udt_highlight.tar 1.01 2002-04-26 6.0 Michael Brailsford Very minor bug fix.
udt_highlight.tar 1.0 2002-04-26 6.0 Michael Brailsford Improved the handling of typedefs.  Now it properly handles something like "typedef long long int llint;".  Added support for user configurable colors, also added documentation.  Anyway, this is a major overhaul of the script.  Install the doc, and you can read all about it.  You should still untar the archive in ~/.vim.  When you start up vim type ":helptags ~/.vim/doc" then ":he udt".
syntax_expander.tar 0.92 2002-04-21 6.0 Michael Brailsford Well, just polishing things up.  I am now very confident that it will work.  I ran the command line version on /usr/include and got a syntax highlighting file of 7000 lines.  I included that file in the tar.  I also added some things to aid in expanding this to work with other languages.  For now though it is for C++ only.
syntax_expander.tar 0.91 2002-04-21 6.0 Michael Brailsford Thanks to Gavin Sinclair for suggesting better packaging.  Now you should untar the file in your ~/.vim directory and it will add the syn_expand.vim to the ftplugins/cpp/ directory.  You should then move the csyntax_expander.rb to whereever you keep scripts.
syntax_expander.tar 0.9 2002-04-21 6.0 Michael Brailsford Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github