sourceforge. It is linked from http://www.vim.org/sources.php, but it
is out of date. The source at Google code is more current. It shows
that someone has reverted the handling of java_allow_cpp_keywords:
If I may make a couple of suggestions:
1) Update the source links. The http://www.vim.org/sources.php and
http://www.vim.org/subversion.php pages point to a subversion
repository at Sourceforge that does not appear to be in use.
2) Don't highlight C++ keywords in Java by default. However, Bram
Moolenaar may have had a good reason for reverting to the old
behavior.
James, thank you for pointing me to the active source repository at Google.
--
Joshua Swink
joshua.swink@gmail.com
> To: Joshua Swink <joshua.swink@gmail.com>, 575417-done@bugs.debian.org
> Date: Thu, 25 Mar 2010 14:08:59 -0400
> Subject: Re: Bug#575417: Vim highlights C++ keywords in Java code
> On Thu, Mar 25, 2010 at 1:24 PM, Joshua Swink <joshua.swink@gmail.com> wrote:
> > 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
>
> This appears nowhere in Debian's syntax/java.vim. You can verify this
> by looking at the git repo[0] or by downloading the source package[1]
> yourself. This also doesn't appear in upstream Vim's source, in either
> 7.1[2] or the current trunk[3].
>
> [0]: http://git.debian.org/?p=pkg-vim/vim.git;a=blob;f=runtime/syntax/java.vim;h=18e4532d289c0a4ccf69b630f1cec98c72898b80;> hb=911bf8e23efca783f709d50542a34843dbdd8b69
> [1]: apt-get source vim
> [2]: http://code.google.com/p/vim/source/browse/runtime/syntax/java.vim?spec=svn463e25d28b334622df784faea456a98ddbc0b5ce&r=463e25d28b334622df784faea456a98ddbc0b5ce
> [3]: http://code.google.com/p/vim/source/browse/runtime/syntax/java.vim
On Thu, Mar 25, 2010 at 10:13 AM, Joshua Swink <joshua.swink@gmail.com> wrote:
> I'm trying to track this one down. The Debian sources used for vim
> don't quite jive with the sources from vim.org.
>
> The 7.2 sources from vim.org do not highlight the keywords by default.
> The change appears to have been made on 25 June 2008, well before the
> 9 August 2009 release of vim 7.2.
>
> http://vim.svn.sourceforge.net/viewvc/vim/vim7/runtime/syntax/java.vim?r1=1071&r2=1073
>
> However, the current "original" sources used in the Debian vim-common
> package don't contain that change. In fact, the java.vim file found
> there is not identical to the original one from 7.1 or 7.2.
>
> http://packages.debian.org/sid/vim-common
>
> Anyway, it looks like a Debian packaging issue.
>
> Josh
>
> On Thu, Mar 25, 2010 at 10:01 AM, Benjamin R. Haskell <vim@benizi.com> wrote:
>> On Thu, 25 Mar 2010, sc wrote:
>>
>>> On Thursday 25 March 2010 11:34:50 Benjamin R. Haskell wrote:
>>>
>>> > From :help ft-java-syntax :
>>> >
>>> > In order to help you write code that can be easily
>>> > ported between Java and C++, all C++ keywords can be marked
>>> > as an error in a Java program. To have this add this line in
>>> > your .vimrc file:
>>> >
>>> > :let java_allow_cpp_keywords = 0
>>> >
>>> > So, it seems like the default is supposed to be 1, which
>>> > seems reasonable. (That is: the user must choose to turn
>>> > those keywords into errors.) The syntax file on my system
>>> > appears to confirm that. (Line 126 sets it to 1 if it isn't
>>> > set.) Perhaps your distribution made the choice (mistake,
>>> > IMO) to override that?
>>>
>>> maybe my runtime is out of date? my java.vim is dated
>>> 2009-mar-14
>>>
>>> the way it's coded:
>>>
>>> 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
>>>
>>> (well before my mailer scrunched the long lines)
>>>
>>> appears to me the default is to flag the cpp keywords as
>>> errors unless and until the user puts
>>>
>>> let java_allow_cpp_keywords = 1
>>>
>>> in their .vimrc -- this leads me to think perhaps the help on
>>> this subject isn't really clear on this matter
>>>
>>
>> Mine has:
>>
>> 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 comments at the top indicate that the last change was 2007 Dec 21,
>> but the file timestamp is 2009-10-24 (which is the install date,
>> probably). The same is true on my home computer ('Last Change: 2007 Dec
>> 21', but timestamp matches the install date '2010-03-05')
>>
>> --
>> Best,
>> Ben
>>
>> --
>> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>>
>> To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>>
>
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment