2009/9/21 stone <lbzha...@gmail.com>: > > > 2009/9/16 A. S. Budden <abud...@gmail.com> >>Okay! I think I've figured out what's going on. Please can you >>download the latest version from >>http://sites.google.com/site/abudden/contents/Vim-Scripts/ctags-highlighting >>and let me know whether it works? >>There's a note (that I'd previously missed) in :help globpath() that >>says "Note that on MS-Windows a directory may have a trailing >>backslash, remove it if you put a comma after it.". I think that the >>first entry in your path (which ends in a backslash) was being treated >>as a single path: "C:\Program Files\PC Connectivity >>Solution,C:\WINDOWS\system32", which doesn't make sense. As a result, >>C:\WINDOWS\system32 wasn't being searched. Therefore, I've changed >>the path substitution to: >>let path = substitute($PATH, '\\\?;', ',', 'g') >> >>which removes any trailing backslash at the same time as adding the >>comma. Hopefully this will fix the problem. > Thank you for your reply. > And now, when I run :UpdataTypesFile, there is no error any more. > But the highlight do not show.The tags such as: MACRO define, typedef look > same with before. > How to do with this?
There are three possibilities that I can think of: 1) The problem may be that you don't have the various colour groups defined in your colour scheme. If I'm correct, entering the following should help: :hi Type guifg=blue ctermfg=blue A quick test would be to enter: ":hi DefinedName" and see whether it reports an error. See ":help ctags_highlighting-colours" for more information. The above will, of course, only highlight types, but it's a good way of quickly testing it. If this works, the full list of highlight groups that need to be defined are: ClassName DefinedName Enumerator Function EnumerationName Member Structure Type Union GlobalConstant GlobalVariable A quick (but not necessarily appealing to you) way of getting all of these defined is to download my "Bandit" colour scheme from: http://sites.google.com/site/abudden/contents/Vim-Scripts/bandit-colour-scheme (save to vimfiles/colors and enter :colorscheme bandit). Of course, this will override your colour scheme and you may not like mine! 2) A second possibility is that the generated types file isn't being read correctly. If this is the case, ":source types_c.vim" will fix the problem temporarily, but we'll need to look in a bit more detail to identify why it isn't being read automatically. 3) The other possibility is that types_c.vim doesn't contain the necessary entries (check by opening it in vim). The most common reason for this is that the source and header files are spread over multiple directories and the recursive option wasn't selected. If your files are all in one folder, make sure you run ":cd %:p:h" before you run :UpdateTypesFile (to make sure you're in the correct working directory). If they're spread out like this: c:/path/to/ProjectDir/Source/*.c c:/path/to/ProjectDir/Headers/*.h or something like that, do ":cd c:/path/to/ProjectDir" then ":e Source/MyFile.c" followed by ":UpdateTypesFile!" (note the exclamation mark for recursive operation). Alternatively you do ":let b:TypesFileRecurse = 1" for each buffer and then you won't need the exclamation mark. If you use the project plugin, the CD= and in= parameters make all of this very easy. Hopefully I'll tidy up the options system in the ctags highlighting plugin very soon. Please let me know how you get on: I'm really keen to see this working for you! Regards, Al -- http://sites.google.com/site/abudden --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---