|
1 | 1 | " Vim syntax file |
2 | 2 | " Language: Java |
3 | | -" Maintainer: Claudio Fleiner <[email protected]> |
4 | | -" URL: http://www.fleiner.com/vim/syntax/java.vim |
5 | | -" Last Change: 2012 Oct 05 |
6 | | - |
| 3 | +" Current Maintainer: kamichidu <[email protected]> |
| 4 | +" Current URL: http://github.com/vim-jp/vim-java/ |
| 5 | +" Previous Maintainer: Claudio Fleiner <[email protected]> |
| 6 | +" Previous URL: http://www.fleiner.com/vim/syntax/java.vim |
| 7 | +" Last Change: 2015 Feb 28 |
7 | 8 | " Please check :help java.vim for comments on some of the options available. |
8 | 9 |
|
9 | 10 | " Quit when a syntax file was already loaded |
|
30 | 31 |
|
31 | 32 | " some characters that cannot be in a java program (outside a string) |
32 | 33 | syn match javaError "[\\@`]" |
33 | | -syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|[^-]->\|\*\/" |
| 34 | +syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" |
34 | 35 |
|
35 | 36 | syn match javaOK "\.\.\." |
36 | 37 |
|
@@ -108,8 +109,8 @@ if exists("java_highlight_all") || exists("java_highlight_java") || exists("ja |
108 | 109 | syn cluster javaTop add=javaLangObject |
109 | 110 | endif |
110 | 111 |
|
111 | | -if filereadable(expand("<sfile>:p:h")."/javaid.vim") |
112 | | - source <sfile>:p:h/javaid.vim |
| 112 | +if globpath(&runtimepath, 'syntax/javaid.vim') !=# '' |
| 113 | + source syntax/javaid.vim |
113 | 114 | endif |
114 | 115 |
|
115 | 116 | if exists("java_space_errors") |
@@ -153,10 +154,10 @@ JavaHiLink javaCommentCharacter javaCharacter |
153 | 154 |
|
154 | 155 | syn cluster javaTop add=javaComment,javaLineComment |
155 | 156 |
|
156 | | -if !exists("java_ignore_javadoc") && main_syntax != 'jsp' |
| 157 | +if !exists("java_ignore_javadoc") && main_syntax != 'jsp' && globpath(&runtimepath, 'syntax/html.vim') !=# '' |
157 | 158 | syntax case ignore |
158 | 159 | " syntax coloring for javadoc comments (HTML) |
159 | | - syntax include @javaHtml <sfile>:p:h/html.vim |
| 160 | + syntax include @javaHtml syntax/html.vim |
160 | 161 | unlet b:current_syntax |
161 | 162 | " HTML enables spell checking for all text that is not in a syntax item. This |
162 | 163 | " is wrong for Java (all identifiers would be spell-checked), so it's undone |
|
0 commit comments