> 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.
No comments:
Post a Comment