Bug#575417: Vim highlights C++ keywords in Java code

Joshua Swink joshua.swink at gmail.com
Thu Mar 25 17:24:06 UTC 2010


Package: vim-common
Version: 2:7.2.330-1

When you enter C++ keywords in java code, such as "template", vim
highlights them as syntax errors.

The default behavior of vim is not to do this. The Debian version of
vim does so. However, this doesn't appear to have been the result of a
deliberate choice, because the "original" source used while building
the vim-common package is not identical to the actual vim source.

Here's the relevant text from the java.vim file in vim 7.1:

if !exists("java_allow_cpp_keywords")
  syn keyword javaError auto delete extern friend inline redeclared
  syn keyword javaError register signed sizeof struct template typedef union
  syn keyword javaError unsigned operator
endif

And in vim 7.2:

if !exists("java_allow_cpp_keywords")
  " The default used to be to highlight C++ keywords.  But several people
  " don't like that, so default to not highlighting these.
  let java_allow_cpp_keywords = 1
endif
if !java_allow_cpp_keywords
  syn keyword javaError auto delete extern friend inline redeclared
  syn keyword javaError register signed sizeof struct template typedef union
  syn keyword javaError unsigned operator
endif

The Debian "orig" java.vim file for vim-common 2:7.2.330-1 is the same
as the one from vim 7.1 (for this snippet of text only). This is not
the result of a patch - the source used is simply not the correct
source.

--
Joshua Swink
joshua.swink at gmail.com





More information about the pkg-vim-maintainers mailing list