diff options
Diffstat (limited to 'runtime/syntax/java.vim')
-rw-r--r-- | runtime/syntax/java.vim | 169 |
1 files changed, 82 insertions, 87 deletions
diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index c22c67bba..89320597f 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -19,9 +19,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" don't use standard HiLink, it will not work with included syntax files -command! -nargs=+ JavaHiLink hi def link <args> - " some characters that cannot be in a java program (outside a string) syn match javaError "[\\@`]" syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" @@ -30,7 +27,7 @@ syn match javaOK "\.\.\." " use separate name so that it can be deleted in javacc.vim syn match javaError2 "#\|=<" -JavaHiLink javaError2 javaError +hi def link javaError2 javaError @@ -73,32 +70,32 @@ if exists("java_highlight_all") || exists("java_highlight_java") || exists("ja syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException syn cluster javaTop add=javaR_JavaLang syn cluster javaClasses add=javaR_JavaLang - JavaHiLink javaR_JavaLang javaR_Java + hi def link javaR_JavaLang javaR_Java syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary syn cluster javaTop add=javaC_JavaLang syn cluster javaClasses add=javaC_JavaLang - JavaHiLink javaC_JavaLang javaC_Java + hi def link javaC_JavaLang javaC_Java syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError syn cluster javaTop add=javaE_JavaLang syn cluster javaClasses add=javaE_JavaLang - JavaHiLink javaE_JavaLang javaE_Java + hi def link javaE_JavaLang javaE_Java syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException syn cluster javaTop add=javaX_JavaLang syn cluster javaClasses add=javaX_JavaLang - JavaHiLink javaX_JavaLang javaX_Java + hi def link javaX_JavaLang javaX_Java - JavaHiLink javaR_Java javaR_ - JavaHiLink javaC_Java javaC_ - JavaHiLink javaE_Java javaE_ - JavaHiLink javaX_Java javaX_ - JavaHiLink javaX_ javaExceptions - JavaHiLink javaR_ javaExceptions - JavaHiLink javaE_ javaExceptions - JavaHiLink javaC_ javaConstant + hi def link javaR_Java javaR_ + hi def link javaC_Java javaC_ + hi def link javaE_Java javaE_ + hi def link javaX_Java javaX_ + hi def link javaX_ javaExceptions + hi def link javaR_ javaExceptions + hi def link javaE_ javaExceptions + hi def link javaC_ javaConstant syn keyword javaLangObject clone equals finalize getClass hashCode syn keyword javaLangObject notify notifyAll toString wait - JavaHiLink javaLangObject javaConstant + hi def link javaLangObject javaConstant syn cluster javaTop add=javaLangObject endif @@ -141,9 +138,9 @@ syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,ja syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 syn match javaCommentStar contained "^\s*\*$" syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell -JavaHiLink javaCommentString javaString -JavaHiLink javaComment2String javaString -JavaHiLink javaCommentCharacter javaCharacter +hi def link javaCommentString javaString +hi def link javaComment2String javaString +hi def link javaCommentCharacter javaCharacter syn cluster javaTop add=javaComment,javaLineComment @@ -236,26 +233,26 @@ if exists("java_highlight_debug") syn cluster javaTop add=javaDebug - JavaHiLink javaDebug Debug - JavaHiLink javaDebugString DebugString - JavaHiLink javaDebugStringError javaError - JavaHiLink javaDebugType DebugType - JavaHiLink javaDebugBoolean DebugBoolean - JavaHiLink javaDebugNumber Debug - JavaHiLink javaDebugSpecial DebugSpecial - JavaHiLink javaDebugSpecialCharacter DebugSpecial - JavaHiLink javaDebugCharacter DebugString - JavaHiLink javaDebugParen Debug - - JavaHiLink DebugString String - JavaHiLink DebugSpecial Special - JavaHiLink DebugBoolean Boolean - JavaHiLink DebugType Type + hi def link javaDebug Debug + hi def link javaDebugString DebugString + hi def link javaDebugStringError javaError + hi def link javaDebugType DebugType + hi def link javaDebugBoolean DebugBoolean + hi def link javaDebugNumber Debug + hi def link javaDebugSpecial DebugSpecial + hi def link javaDebugSpecialCharacter DebugSpecial + hi def link javaDebugCharacter DebugString + hi def link javaDebugParen Debug + + hi def link DebugString String + hi def link DebugSpecial Special + hi def link DebugBoolean Boolean + hi def link DebugType Type endif if exists("java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" - JavaHiLink javaInParen javaError + hi def link javaInParen javaError syn cluster javaTop add=javaInParen endif @@ -270,7 +267,7 @@ syn region javaParenT1 transparent matchgroup=javaParen1 start="\[" end="\]" co syn region javaParenT2 transparent matchgroup=javaParen2 start="\[" end="\]" contains=@javaTop,javaParenT contained syn match javaParenError "\]" -JavaHiLink javaParenError javaError +hi def link javaParenError javaError if exists("java_highlight_functions") syn match javaLambdaDef "([a-zA-Z0-9_<>\[\], \t]*)\s*->" @@ -283,56 +280,54 @@ endif exec "syn sync ccomment javaComment minlines=" . java_minlines " The default highlighting. -JavaHiLink javaLambdaDef Function -JavaHiLink javaFuncDef Function -JavaHiLink javaVarArg Function -JavaHiLink javaBraces Function -JavaHiLink javaBranch Conditional -JavaHiLink javaUserLabelRef javaUserLabel -JavaHiLink javaLabel Label -JavaHiLink javaUserLabel Label -JavaHiLink javaConditional Conditional -JavaHiLink javaRepeat Repeat -JavaHiLink javaExceptions Exception -JavaHiLink javaAssert Statement -JavaHiLink javaStorageClass StorageClass -JavaHiLink javaMethodDecl javaStorageClass -JavaHiLink javaClassDecl javaStorageClass -JavaHiLink javaScopeDecl javaStorageClass -JavaHiLink javaBoolean Boolean -JavaHiLink javaSpecial Special -JavaHiLink javaSpecialError Error -JavaHiLink javaSpecialCharError Error -JavaHiLink javaString String -JavaHiLink javaCharacter Character -JavaHiLink javaSpecialChar SpecialChar -JavaHiLink javaNumber Number -JavaHiLink javaError Error -JavaHiLink javaStringError Error -JavaHiLink javaStatement Statement -JavaHiLink javaOperator Operator -JavaHiLink javaComment Comment -JavaHiLink javaDocComment Comment -JavaHiLink javaLineComment Comment -JavaHiLink javaConstant Constant -JavaHiLink javaTypedef Typedef -JavaHiLink javaTodo Todo -JavaHiLink javaAnnotation PreProc - -JavaHiLink javaCommentTitle SpecialComment -JavaHiLink javaDocTags Special -JavaHiLink javaDocParam Function -JavaHiLink javaDocSeeTagParam Function -JavaHiLink javaCommentStar javaComment - -JavaHiLink javaType Type -JavaHiLink javaExternal Include - -JavaHiLink htmlComment Special -JavaHiLink htmlCommentPart Special -JavaHiLink javaSpaceError Error - -delcommand JavaHiLink +hi def link javaLambdaDef Function +hi def link javaFuncDef Function +hi def link javaVarArg Function +hi def link javaBraces Function +hi def link javaBranch Conditional +hi def link javaUserLabelRef javaUserLabel +hi def link javaLabel Label +hi def link javaUserLabel Label +hi def link javaConditional Conditional +hi def link javaRepeat Repeat +hi def link javaExceptions Exception +hi def link javaAssert Statement +hi def link javaStorageClass StorageClass +hi def link javaMethodDecl javaStorageClass +hi def link javaClassDecl javaStorageClass +hi def link javaScopeDecl javaStorageClass +hi def link javaBoolean Boolean +hi def link javaSpecial Special +hi def link javaSpecialError Error +hi def link javaSpecialCharError Error +hi def link javaString String +hi def link javaCharacter Character +hi def link javaSpecialChar SpecialChar +hi def link javaNumber Number +hi def link javaError Error +hi def link javaStringError Error +hi def link javaStatement Statement +hi def link javaOperator Operator +hi def link javaComment Comment +hi def link javaDocComment Comment +hi def link javaLineComment Comment +hi def link javaConstant Constant +hi def link javaTypedef Typedef +hi def link javaTodo Todo +hi def link javaAnnotation PreProc + +hi def link javaCommentTitle SpecialComment +hi def link javaDocTags Special +hi def link javaDocParam Function +hi def link javaDocSeeTagParam Function +hi def link javaCommentStar javaComment + +hi def link javaType Type +hi def link javaExternal Include + +hi def link htmlComment Special +hi def link htmlCommentPart Special +hi def link javaSpaceError Error let b:current_syntax = "java" |